1 /++ 2 Imports all of $(LINK2 https://github.com/mysql-d/mysql-native, mysql-native). 3 4 MySQL_to_D_Type_Mappings: 5 6 $(TABLE 7 $(TR $(TH MySQL ) $(TH D )) 8 9 $(TR $(TD NULL ) $(TD typeof(null) )) 10 $(TR $(TD BIT ) $(TD bool )) 11 $(TR $(TD TINY ) $(TD (u)byte )) 12 $(TR $(TD SHORT ) $(TD (u)short )) 13 $(TR $(TD INT24 ) $(TD (u)int )) 14 $(TR $(TD INT ) $(TD (u)int )) 15 $(TR $(TD LONGLONG ) $(TD (u)long )) 16 $(TR $(TD FLOAT ) $(TD float )) 17 $(TR $(TD DOUBLE ) $(TD double )) 18 ) 19 20 $(TABLE 21 $(TR $(TH MySQL ) $(TH D )) 22 23 $(TR $(TD TIMESTAMP ) $(TD DateTime )) 24 $(TR $(TD TIME ) $(TD TimeOfDay )) 25 $(TR $(TD YEAR ) $(TD ushort )) 26 $(TR $(TD DATE ) $(TD Date )) 27 $(TR $(TD DATETIME ) $(TD DateTime )) 28 ) 29 30 $(TABLE 31 $(TR $(TH MySQL ) $(TH D )) 32 33 $(TR $(TD VARCHAR, ENUM, SET, VARSTRING, STRING, NEWDECIMAL ) $(TD string )) 34 $(TR $(TD TINYBLOB, MEDIUMBLOB, BLOB, LONGBLOB ) $(TD ubyte[] )) 35 $(TR $(TD TINYTEXT, MEDIUMTEXT, TEXT, LONGTEXT ) $(TD string )) 36 $(TR $(TD other ) $(TD unsupported (throws) )) 37 ) 38 39 D_to_MySQL_Type_Mappings: 40 41 $(TABLE 42 $(TR $(TH D ) $(TH MySQL )) 43 44 $(TR $(TD typeof(null) ) $(TD NULL )) 45 $(TR $(TD bool ) $(TD BIT )) 46 $(TR $(TD (u)byte ) $(TD (UNSIGNED) TINY )) 47 $(TR $(TD (u)short ) $(TD (UNSIGNED) SHORT )) 48 $(TR $(TD (u)int ) $(TD (UNSIGNED) INT )) 49 $(TR $(TD (u)long ) $(TD (UNSIGNED) LONGLONG )) 50 $(TR $(TD float ) $(TD (UNSIGNED) FLOAT )) 51 $(TR $(TD double ) $(TD (UNSIGNED) DOUBLE )) 52 53 $(TR $(TD $(STD_DATETIME_DATE Date) ) $(TD DATE )) 54 $(TR $(TD $(STD_DATETIME_DATE TimeOfDay)) $(TD TIME )) 55 $(TR $(TD $(STD_DATETIME_DATE Time) ) $(TD TIME )) 56 $(TR $(TD $(STD_DATETIME_DATE DateTime) ) $(TD DATETIME )) 57 $(TR $(TD `mysql.types.Timestamp` ) $(TD TIMESTAMP )) 58 59 $(TR $(TD string ) $(TD VARCHAR )) 60 $(TR $(TD char[] ) $(TD VARCHAR )) 61 $(TR $(TD (u)byte[] ) $(TD SIGNED TINYBLOB )) 62 $(TR $(TD other ) $(TD unsupported with Variant (throws) or MySQLVal (compiler error) )) 63 ) 64 65 Note: This by default imports the unsafe version of the MySQL API. Please 66 switch to the safe version (`import mysql.safe`) as this will be the default in 67 the future. If you would prefer to use the unsafe version, it is advised to use 68 the import `mysql.unsafe`, as this will be supported for at least one more 69 major version, albeit deprecated. 70 71 $(SAFE_MIGRATION) 72 +/ 73 module mysql; 74 75 // by default we do the unsafe API. 76 public import mysql.unsafe;