Access to the database is made available through connection objects. The module must provide the following constructor for these:
Constructor for creating a connection to the database. Returns a
Connection object. It takes a number of parameters
that are database dependent.Note 1
These module globals must be defined:
String constant stating the supported DB API level. Currently only the strings 1.0 and 2.0 are allowed. If not given, a Database API 1.0 level interface should be assumed.
Integer constant stating the level of thread safety the interface supports. Possible values are:
0 = Threads may not share the module.
1 = Threads may share the module, but not connections.
2 = Threads may share the module and connections.
3 = Threads may share the module, connections, and cursors.
Sharing in this context means that two threads may use a resource without wrapping it using a mutex semaphore to implement resource locking. You can’t always make external resources thread-safe by managing access using a mutex: the resource may rely on global variables or other external sources that are beyond your control.
String constant stating the type of parameter marker formatting expected by the interface. Possible values are:Note 2
qmark = Question-mark style, e.g.,
numeric = Numeric, positional style, e.g.,
named = Named style, e.g.,
format = ANSI C
printf format codes, ...