Skip to content

Commit ff8ac54

Browse files
committed
use ODBC dub package
1 parent 51f33a3 commit ff8ac54

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

dub.json

+8-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"versions": ["USE_MYSQL", "USE_SQLITE", "USE_PGSQL", "USE_ODBC"],
2121
"dependencies": {
2222
"mysql-native": "~>3.0.3",
23-
"derelict-pq": "~>2.2.0"
23+
"derelict-pq": "~>2.2.0",
24+
"odbc": "~>1.0.0"
2425
},
2526
"libs-posix": ["sqlite3", "odbc"],
2627
"libs-windows": ["odbc32"],
@@ -38,7 +39,8 @@
3839
"versions": ["USE_MYSQL", "USE_SQLITE", "USE_PGSQL", "USE_ODBC"],
3940
"dependencies": {
4041
"mysql-native": "~>3.0.3",
41-
"derelict-pq": "~>2.2.0"
42+
"derelict-pq": "~>2.2.0",
43+
"odbc": "~>1.0.0"
4244
},
4345
"libs-windows": ["odbc32"],
4446
"copyFiles-windows-x86": [ "libs/win32/sqlite3.dll", "libs/win32/libpq.dll"],
@@ -84,7 +86,10 @@
8486
"name": "ODBC",
8587
"versions": ["USE_ODBC"],
8688
"libs-posix": ["odbc"],
87-
"libs-windows": ["odbc32"]
89+
"libs-windows": ["odbc32"],
90+
"dependencies": {
91+
"odbc": "~>1.0.0"
92+
}
8893
},
8994
{
9095
"name": "API"

source/ddbc/drivers/odbcddbc.d

+4-10
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,10 @@ version (USE_ODBC)
7676

7777
// The etc.c.odbc.* modules are deprecated and due for removal in Feb 2022
7878
// https://dlang.org/phobos/etc_c_odbc_sql.html
79-
// We should now use core.sys.windows.* instead
80-
static if(__VERSION__ < 2096) {
81-
import etc.c.odbc.sql;
82-
import etc.c.odbc.sqlext;
83-
import etc.c.odbc.sqltypes;
84-
} else {
85-
import core.sys.windows.sql;
86-
import core.sys.windows.sqlext;
87-
import core.sys.windows.sqltypes;
88-
}
79+
// We should now use the odbc dub package instead
80+
import odbc.sql;
81+
import odbc.sqlext;
82+
import odbc.sqltypes;
8983

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

0 commit comments

Comments
 (0)