Skip to content

Commit

Permalink
use ODBC dub package
Browse files Browse the repository at this point in the history
  • Loading branch information
SingingBush committed Mar 2, 2022
1 parent 51f33a3 commit ff8ac54
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
11 changes: 8 additions & 3 deletions dub.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"versions": ["USE_MYSQL", "USE_SQLITE", "USE_PGSQL", "USE_ODBC"],
"dependencies": {
"mysql-native": "~>3.0.3",
"derelict-pq": "~>2.2.0"
"derelict-pq": "~>2.2.0",
"odbc": "~>1.0.0"
},
"libs-posix": ["sqlite3", "odbc"],
"libs-windows": ["odbc32"],
Expand All @@ -38,7 +39,8 @@
"versions": ["USE_MYSQL", "USE_SQLITE", "USE_PGSQL", "USE_ODBC"],
"dependencies": {
"mysql-native": "~>3.0.3",
"derelict-pq": "~>2.2.0"
"derelict-pq": "~>2.2.0",
"odbc": "~>1.0.0"
},
"libs-windows": ["odbc32"],
"copyFiles-windows-x86": [ "libs/win32/sqlite3.dll", "libs/win32/libpq.dll"],
Expand Down Expand Up @@ -84,7 +86,10 @@
"name": "ODBC",
"versions": ["USE_ODBC"],
"libs-posix": ["odbc"],
"libs-windows": ["odbc32"]
"libs-windows": ["odbc32"],
"dependencies": {
"odbc": "~>1.0.0"
}
},
{
"name": "API"
Expand Down
14 changes: 4 additions & 10 deletions source/ddbc/drivers/odbcddbc.d
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,10 @@ version (USE_ODBC)

// The etc.c.odbc.* modules are deprecated and due for removal in Feb 2022
// https://dlang.org/phobos/etc_c_odbc_sql.html
// We should now use core.sys.windows.* instead
static if(__VERSION__ < 2096) {
import etc.c.odbc.sql;
import etc.c.odbc.sqlext;
import etc.c.odbc.sqltypes;
} else {
import core.sys.windows.sql;
import core.sys.windows.sqlext;
import core.sys.windows.sqltypes;
}
// We should now use the odbc dub package instead
import odbc.sql;
import odbc.sqlext;
import odbc.sqltypes;

/*private SQLRETURN check(lazy SQLRETURN fn, SQLHANDLE h, SQLSMALLINT t,
string file = __FILE__, size_t line = __LINE__)
Expand Down

0 comments on commit ff8ac54

Please sign in to comment.