Resources | Resources |



dbc interfaces

The dbc interfaces are

  • dbc_IFactory
  • dbc_IConnection
  • dbc_IStatement
  • dbc_IPreparedStatement
  • dbc_IResultSet
  • dbc_IObserver

When creating or interacting with Brew MP databases, dbc_IFactory is the first interface that is used, and it is created through IEnv_CreateInstance. dbc_IFactory creates a database connection, opens it, and returns a dbc_IConnection to interact with it. dbc_IConnection represents a database connection, which is analogous to file handle. It creates statements and prepares statements for execution. The dbc_IStatement interface allows applications to execute a statement object created via a database connection once or multiple times to modify the database file or produce the results of its query.

dbc_IPreparedStatement allows applications to execute multiple SQL statements that differ slightly by preparing a single query and binding variables to it, making the query process more efficient. dbc_IResultSet represents the results of an executed SQL query and provides methods to retrieve data from a results table and convert it to a desired type. dbc_IObserver object provides the ability to register signals to be set when particular databases or tables change.

All of the interfaces are discussed in detail in this section.