mysql

Imports all of mysql-native.

More...

Modules

commands
module mysql.commands

This module publicly imports mysql.unsafe.commands. Please see that module for more documentation.

connection
module mysql.connection

This module publicly imports mysql.unsafe.connection. Please see that module for more documentation.

escape
module mysql.escape

Escape special characters in MySQL strings.

exceptions
module mysql.exceptions

Exceptions defined by mysql-native.

impl
module mysql.impl
logger
module mysql.logger
Undocumented in source.
maintests
module mysql.maintests
Undocumented in source.
metadata
module mysql.metadata

Retrieve metadata from a DB.

pool
module mysql.pool

This module publicly imports mysql.unsafe.pool. Please see that module for more documentation.

prepared
module mysql.prepared

This module publicly imports mysql.unsafe.prepared. Please see that module for more documentation.

protocol
module mysql.protocol
result
module mysql.result

This module publicly imports mysql.unsafe.result. Please see that module for more documentation.

safe
module mysql.safe

Imports all of mysql-native (safe versions).

types
module mysql.types

Structures for MySQL types not built-in to D/Phobos.

unsafe
module mysql.unsafe

Imports all of mysql-native (unsafe versions).

Public Imports

mysql.unsafe
public import mysql.unsafe;
Undocumented in source.

Detailed Description

MySQL to D Type Mappings

MySQLD
NULLtypeof(null)
BITbool
TINY(u)byte
SHORT(u)short
INT24(u)int
INT(u)int
LONGLONG(u)long
FLOATfloat
DOUBLEdouble
MySQLD
TIMESTAMPDateTime
TIMETimeOfDay
YEARushort
DATEDate
DATETIMEDateTime
MySQLD
VARCHAR, ENUM, SET, VARSTRING, STRING, NEWDECIMALstring
TINYBLOB, MEDIUMBLOB, BLOB, LONGBLOBubyte[]
TINYTEXT, MEDIUMTEXT, TEXT, LONGTEXTstring
otherunsupported (throws)

D to MySQL Type Mappings

DMySQL
typeof(null)NULL
boolBIT
(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.TimestampTIMESTAMP
stringVARCHAR
char[]VARCHAR
(u)byte[]SIGNED TINYBLOB
otherunsupported with Variant (throws) or MySQLVal (compiler error)

Note: This by default imports the unsafe version of the MySQL API. Please switch to the safe version (import mysql.safe) as this will be the default in the future. If you would prefer to use the unsafe version, it is advised to use the import mysql.unsafe, as this will be supported for at least one more major version, albeit deprecated.

$(SAFE_MIGRATION)

Meta