DatabaseDriverSpec

Database Driver API specification

Specifies a unified interface for database client implementations.

There is no reason to use this. Exists for documentation purposes only.

Feel free to implement drivers using structs.

oceandrift is designed to work with anything that corresponds to the API shown here.

Members

Functions

autoCommit
bool autoCommit()

Determines whether “auto commit” is enabled for the current database connection

autoCommit
void autoCommit(bool enable)

Enables/disables “auto commit” (if available on the underlying database)

close
void close()

Shutdown the database current connection

connect
void connect()

Establishes a fresh connection to the database

connected
bool connected()

Gets the current connection status

execute
void execute(string sql)

Executes the provided SQL statement

lastInsertID
DBValue lastInsertID()
prepare
Statement prepare(string sql)

Prepares the passed SQL statement

transactionCommit
void transactionCommit()

Commits the current transaction

transactionRollback
void transactionRollback()

Rolls back the current transaction

transactionStart
void transactionStart()

Begins a database transaction (Requires support by the underlying database, of course)

Meta