Menu
Simba Technologies
Simba Technologies

SimbaEngine X SDK 10.1.3
Developing Drivers for SQL-Capable Data Stores

API Overview

This section introduces the functionality and workflows of the C++ DSI API and the DSI API Extensions, which are the main APIs that you use to build a custom driver. The Java APIs are similar.

DSI API

The DSI API exposes the classes needed to build your own Data Store Interface Implementation using C++. The C# and Java versions of these classes, the DotNet DSI API and the Java DSI API, provide similar functionality as the C++ classes.

The DSI API functionality is grouped into Core classes and Data Engine classes.

Core classes

The Core classes provide all of the essential functionality to establish and manage the connection to your data source:

Class

Description

IDriver

IDriver is a singleton instance constructed when the driver is first loaded. Its primary responsibility is to construct IEnvironment objects and manage any driver-wide properties. An abstract base class DSIDriver is provided to assist in some of these responsibilities, including initializing defaults and managing properties.

IEnvironment

IEnvironment objects correspond to the ODBC environment (ENV) handles allocated by SQLAllocHandle. Their primary responsibility is to construct IConnection objects and manage any environment properties. An abstract base class DSIEnvironment is provided.

IConnection

IConnection objects correspond to the ODBC connection (DBC) handles allocated by SQLAllocHandle. Their primary responsibility is to handle user authentication, construct IStatementobjects, and manage any connection properties. An abstract base class DSIConnection is provided.

IStatement

IStatement objects correspond to the ODBC statement (STMT) handles allocated by SQLAllocHandle. Their primary responsibility is to construct IDataEngine objects and manage any statement properties. An abstract base class DSIStatement is provided.

IMessageSource

IMessageSource is responsible for loading error messages and warnings from your driver. An abstract implementation DSIMessageSource is provided to load messages generated by the SDK. For more information, see "Using or building a message source" in Handling Errors and Exceptions.

ILogger

ILogger is responsible for storing or printing log messages from your driver. Each of the IDriver, IEnvironment, IConnection, and IStatement classes has a GetLog() method which must return the most appropriate logger for that object. You may share loggers between all the objects or construct a different logger for each. The DSIFileLogger class is fully implemented to store the log messages to a text file, but you may change the behaviour in any way by extending the ILogger interface directly or by subclassing the partially implemented DSILoggerclass.

Data Engine classes

The Data Engine classes are the subset used to perform the data access functions against your data store:

Class

Description

IDataEngine

IDataEngine is responsible for constructing an IQueryExecutor when preparing queries or constructing an IResult for catalog function metadata. An abstract base class DSIDataEngine is provided to assist in implementing filters for the catalog function metadata.

IQueryExecutor

IQueryExecutor is responsible for executing a query and generating IResults objects.

IResults

An IResults object represents a collection of one or more IResult objects. DSIResults provides a basic implementation for accessing and managing a collection of IResult objects.

IResult

IResult is responsible for retrieving column data and maintaining a cursor across result rows. At a minimum, the cursor should support movement in a forward-only direction. Abstract base classes DSISimpleResultSetand DSISimpleRowCountResult are provided to deal with some basic functionality.

 

Related Links

SimbaEngine C++ API Reference

SimbaEngine Java API Reference

Building Blocks for a DSI Implementation

Lifecycle of DSI Objects