Use a DB via plain SQL statements.
Connect to a MySQL/MariaDB server.
Escape special characters in MySQL strings.
Exceptions defined by mysql-native.
Retrieve metadata from a DB.
Connect to a MySQL/MariaDB database using vibe.d's ConnectionPool.
Use a DB via SQL prepared statements.
Structures for data received: rows and result sets (ie, a range of rows).
Structures for MySQL types not built-in to D/Phobos.
MySQL | D |
---|---|
NULL | typeof(null) |
BIT | bool |
TINY | (u)byte |
SHORT | (u)short |
INT24 | (u)int |
INT | (u)int |
LONGLONG | (u)long |
FLOAT | float |
DOUBLE | double |
MySQL | D |
---|---|
TIMESTAMP | DateTime |
TIME | TimeOfDay |
YEAR | ushort |
DATE | Date |
DATETIME | DateTime |
MySQL | D |
---|---|
VARCHAR, ENUM, SET, VARSTRING, STRING, NEWDECIMAL | string |
TINYBLOB, MEDIUMBLOB, BLOB, LONGBLOB | ubyte[] |
TINYTEXT, MEDIUMTEXT, TEXT, LONGTEXT | string |
other | unsupported (throws) |
D | MySQL |
---|---|
typeof(null) | NULL |
bool | BIT |
(u)byte | (UNSIGNED) TINY |
(u)short | (UNSIGNED) SHORT |
(u)int | (UNSIGNED) INT |
(u)long | (UNSIGNED) LONGLONG |
float | (UNSIGNED) FLOAT |
double | (UNSIGNED) DOUBLE |
$(STD_DATETIME_DATE Date) | DATE |
$(STD_DATETIME_DATE TimeOfDay) | TIME |
$(STD_DATETIME_DATE Time) | TIME |
$(STD_DATETIME_DATE DateTime) | DATETIME |
mysql.types.Timestamp | TIMESTAMP |
string | VARCHAR |
char[] | VARCHAR |
(u)byte[] | SIGNED TINYBLOB |
other | unsupported (throws) |
Imports all of mysql-native.