buggins / ddbc

DDBC is DB Connector for D language (similar to JDBC)
78 stars 45 forks source link

ddbc requires changes for latest mysql-native #47

Closed SingingBush closed 7 years ago

SingingBush commented 7 years ago

some changes are needed for source/ddbc/drivers/mysqlddbc.d to still compile with latest version of mysql-native

mysql-native 1.1.0: building configuration "library"...
ddbc 0.3.2: building configuration "full"...
../../../.dub/packages/ddbc-0.3.2/ddbc/source/ddbc/drivers/mysqlddbc.d(319,15): Error: undefined identifier 'Command'
../../../.dub/packages/ddbc-0.3.2/ddbc/source/ddbc/drivers/mysqlddbc.d(342,23): Error: undefined identifier 'FieldDescription'
../../../.dub/packages/ddbc-0.3.2/ddbc/source/ddbc/drivers/mysqlddbc.d(359,23): Error: undefined identifier 'ParamDescription'
dmd failed with exit code 1.
SingingBush commented 7 years ago

actually that's prob just my compiler version (using 2.074). I updated mysqlddbc.d to get around that problem using:

import ddbc.core;

version(USE_MYSQL) {

import mysql.connection;
import mysql.commands : Command; // <-  new line
import mysql.protocol.constants; // <-  new line 
import mysql.protocol.packets : FieldDescription, ParamDescription; // <-  new line