Skip to content

Commit

Permalink
Merge pull request #280 from Mause/bugfix/correct-dialect-registration
Browse files Browse the repository at this point in the history
fix: use modern dialect registration
  • Loading branch information
Mause authored Jun 23, 2022
2 parents 6273aa1 + 6790536 commit dbcc237
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions duckdb_engine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
from sqlalchemy.dialects.postgresql.base import PGExecutionContext, PGInspector
from sqlalchemy.engine.url import URL

name = "duckdb" # TODO: find if sqlalchemy documents this field anywhere


class DBAPI:
paramstyle = "qmark"
Expand Down Expand Up @@ -196,6 +194,3 @@ def get_view_names(
rs = connection.exec_driver_sql(s)

return [row[0] for row in rs]


dialect = Dialect
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ipython-sql = "^0.4.1"
sqlalchemy-stubs = "^0.4"

[tool.poetry.plugins."sqlalchemy.dialects"]
duckdb = "duckdb_engine"
duckdb = "duckdb_engine:Dialect"

[tool.pytest.ini_options]
addopts = "--hypothesis-show-statistics"
Expand Down

0 comments on commit dbcc237

Please sign in to comment.