Changeset: ce5bb52d6244 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/ce5bb52d6244
Added Files:
        sql/odbc/tests/Tests/pyodbc-test.SQL.py
Modified Files:
        sql/odbc/tests/Tests/All
Branch: Sep2022
Log Message:

Example test using pyodbc.


diffs (19 lines):

diff --git a/sql/odbc/tests/Tests/All b/sql/odbc/tests/Tests/All
--- a/sql/odbc/tests/Tests/All
+++ b/sql/odbc/tests/Tests/All
@@ -1,3 +1,4 @@
 HAVE_ODBC?ODBCgetInfo
 HAVE_ODBC?ODBCmetadata
 HAVE_ODBC?ODBCStmtAttr
+HAVE_PYODBC?pyodbc-test
diff --git a/sql/odbc/tests/Tests/pyodbc-test.SQL.py 
b/sql/odbc/tests/Tests/pyodbc-test.SQL.py
new file mode 100644
--- /dev/null
+++ b/sql/odbc/tests/Tests/pyodbc-test.SQL.py
@@ -0,0 +1,6 @@
+import pyodbc
+
+cnxn = pyodbc.connect('DSN=MonetDB-Test')
+crs = cnxn.cursor()
+crs.executemany("""select *, cast(? as string), cast(? as integer) from 
sys._tables;""", [ ('test', 1), ('test2', 2) ])
+data = crs.fetchall()
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to