A struct representing a database connection.
An exception type to distinguish exceptions thrown by this module.
Server refresh flags
Column type codes
Server capability flags.
Function to pack a TimeOfDay into a binary encoding for transmission to the server.
Function to pack a Date into a binary encoding for transmission to the server.
Function to pack a DateTime into a binary encoding for transmission to the server.
Function to extract a Date from a binary encoded row.
Function to extract a Date from a text encoded column value.
Function to extract a DateTime from a binary encoded row.
Function to extract a DateTime from a text encoded column value.
Function to extract a DateTime from a ulong.
Function to extract a time difference from a binary encoded row.
Function to extract a time difference from a text encoded column value.
Function to extract a TimeOfDay from a binary encoded row.
Function to extract a TimeOfDay from a text encoded column value.
Composite representation of a column value
A struct to represent specializations of prepared statement parameters.
Encapsulation of an SQL command or query.
A struct representing an EOF packet
A struct representing a field (column) description packet
Facilities to recover meta-data from a connection
A struct to hold column metadata
A struct to hold stored function metadata
A struct representing an OK or Error packet
A struct representing a prepared statement parameter description packet
A struct to represent specializations of prepared statement parameters.
A struct representing the collation of a prepared statement parameter description sequence
An input range of Rows.
A Random access range of Rows.
A struct representing the collation of a sequence of FieldDescription packets.
A struct to represent a single row of a result set.
A simple struct to represent time difference.
A D struct to stand for a TIMESTAMP
A native D driver for the MySQL database system. Source file mysql.d.
This module attempts to provide composite objects and methods that will allow a wide range of common database operations, but be relatively easy to use. The design is a first attempt to illustrate the structure of a set of modules to cover popular database systems and ODBC.
It has no dependecies on GPL header files or libraries, instead communicating directly with the server via the published client/server protocol.
http://forge.mysql.com/wiki/MySQL_Internals_ClientServer_Protocol
http://forge.mysql.com/w/index.php?title=MySQL_Internals_ClientServer_Protocol&diff=5078&oldid=4374
This version is not by any means comprehensive, and there is still a good deal of work to do. As a general design position it avoids providing wrappers for operations that can be accomplished by simple SQL sommands, unless the command produces a result set. There are some instances of the latter category to provide simple meta-data for the database,
Its primary objects are:
$(LIAn input range of similar rows.)
It has currently only been compiled and unit tested on Ubuntu with D2.055 using a TCP loopback connection to a server on the local machine.
There are numerous examples of usage in the unittest sections.
The file mysqld.sql, included with the module source code, can be used to generate the tables required by the unit tests.
There is an outstanding issue with Connections. Normally MySQL clients sonnect to a server on the same machine via a Unix socket on *nix systems, and through a named pipe on Windows. Neither of these conventions is currently supported. TCP must be used for all connections.
Since there is currently no SHA1 support on Phobos, a simple translation of the NIST example C code for SHA1 is also included with this module.