Using and Configuring the DataView Reader
Accessing Data Views from the DataView Reader
To use the DataView Reader to access a data view defined in Inspector, build a component that explicitly exposes some or all the data views defined in an ObjectStore database. You build the component by implementing ostcConnect(), ostcInitialize(), and ostcDisconnect().
You do not have to define any subtypes of ostc_ServerOperation. Instead, your implementation of ostcConnect() must expose one or more data views with one or a combination of the following functions.
To expose all the data views in a specified database, use the following member of ostc_ServerSession:
void exposeAllDataViews(oscs_ConstString database_name);
You can call this function several times, specifying different databases. Each data view is mapped to a Server operation whose name is the same as the data view's name.
To expose a data view with a specified name in a specified database, use the following member of ostc_ServerSession:
void exposeDataView(
oscs_ConstString database_name,
oscs_ConstString data_view_name,
oscs_ConstString operation_name = 0
);
operation_name, if nonzero, specifies the name of the Server operation to which the data view is mapped. If operation_name is 0, data_view_name is used as the operation name.
You can expose only one database with a given name at a time. If you have exposed a data view from one database, and then attempt to expose a data view with the same name from another database, the attempt is silently ignored. Only the first data view will be accessible.
data_view_name can also contain an SQL statement that customizes the data view defined in database_name. The SQL statement must follow SQL syntax rules. The next paragraph describes the SQL syntax accepted by the DataView Reader.
[previous] [next]