| #define SQT_COLUMN_CUSTOM | ( | COLUMN_NAME, | |
| VALUE_SOURCE ) |
Defines a column that binds to the specified custom value source.
| COLUMN_NAME | The name of the column in the database. It will be also used as the instance name of the column. |
| VALUE_SOURCE | A type that satisfies the sqt::ValueSourceType concept, which defines the value type and methods for retrieving and setting values in an entity instance. |
This macro is similar to SQT_COLUMN_FIELD, except that it binds to a custom value source. It is useful if the column value is not directly accessible through a field or accessor methods. For example, the column value may be derived from multiple fields or requires some computation or transformation before getting or setting it.
The sqt::ValueSourceType concept specifies the interface that a value source must implement:
Example usage: