Last updated at 5:07 pm UTC on 22 June 2008
FlexDB comprises a plugin for accessing DBs with support for native threads and an API for adapting DB vendor drivers.
See SqueakSource for a snapshot of the development in progress.
- Modules and interfaces:
- o Smalltalk <-> plugin
- o plugin <-> mini driver
- A new DB (vendor) driver can be adapted to the mini-driver API.
Module: Smalltalk API classes
The Smalltalk API offers the classic classes:
- FlexDB, provides protocol for creation of a DB session
- FlexDBSession, is associated with a mini-driver and its native thread
- FlexDBResult, holds results of a command or a query
- FlexDBRecordset, for mapping and accessing records
- FlexDBRecord, for accessing the data of a record
- FlexDBDataType, base class for non-trivial DB data type coercion
Module: FlexDBPlugin, written in Slang
The plugin handles native threads, loads/unloads mini-drivers and forwards primitive calls to the mini-driver by using the mini-driver API.
Module: mini-driver, dynamic loadable libraries
A mini-drivers adapts its vendor specific DB driver to the mini-driver API. Therefore the FlexDBPlugin does not know anything about the vendor specific DB driver's internals.
Interplay of mini-driver and Smalltalk API
Once a new mini-driver has been created and compiled into a dynamic loadable library, the Smalltalk side can be extended (by subclassing) for accessing the functionality of the associated vendor specific DB driver. There is no need for changing the FlexDBPlugin and the new mini-driver can be loaded on demand.
Passing properties and parameters
Accessing DB data and types
DB data type coercion
Handling of BLOBs
FlexDB actions are performed asynchronously
Whenever possible and supported by the vendor specific DB driver.
Example DBs and tests