MonetDB / pymonetdb

The Python API for MonetDB
https://www.monetdb.org/
Mozilla Public License 2.0
28 stars 20 forks source link

Database Version is not filled for Monetdb #56

Closed antoinecarme closed 4 years ago

antoinecarme commented 5 years ago

Hi,

I am working on an application that uses sqlalchemy for translating machine learning models into SQL code. I need to get the database version from the dialect for debugging purposes.

For Monetdb, the database version is always None, it probably needs to be a tuple.

Some script to reproduce:

import sqlalchemy as sa

lDSN1 = "monetdb://monetdb:monetdb@localhost/db"
engine1 = sa.create_engine(lDSN1, encoding='utf-8', echo=True)

print("INITIALIZE_ENGINE_DRIVER_SERVER_VERSION" , engine1.dialect.driver, engine1.dialect.server_version_info)

Sample outputs (with other databases):

INITIALIZE_ENGINE_DRIVER_SERVER_VERSION ibm_db_sa ('DB2/LINUXX8664', '11.01.0000')
INITIALIZE_ENGINE_DRIVER_SERVER_VERSION kinterbasdb (3, 0, 33100, 'firebird')
INITIALIZE_ENGINE_DRIVER_SERVER_VERSION pymonetdb None
INITIALIZE_ENGINE_DRIVER_SERVER_VERSION pymssql (15, 0, 2000, 5)
INITIALIZE_ENGINE_DRIVER_SERVER_VERSION mysqldb (10, 2, 21, 'MariaDB', 10, 2, '21+maria~sid', 'log')
INITIALIZE_ENGINE_DRIVER_SERVER_VERSION cx_oracle (11, 2, 0, 2, 0)
INITIALIZE_ENGINE_DRIVER_SERVER_VERSION psycopg2 (10, 5)
INITIALIZE_ENGINE_DRIVER_SERVER_VERSION pysqlite (3, 30, 1)

Thanks in advance

Antoine

gijzelaerr commented 4 years ago

This is an issue with the sqlalchemy dialect of monetdb, moved issue here https://github.com/gijzelaerr/sqlalchemy-monetdb/issues/37