Skip to content

Commit fdec3f5

Browse files
committed
Dialect: Fix SQLAlchemy dialect entrypoint
The dialect as designated by the `crate` dialect identifier was still pointing to the `crate` package. Now, it is assigned to this one instead.
1 parent 3bc6b7f commit fdec3f5

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

docs/install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ After that is done, you can import the library, like so:
2828

2929
.. code-block:: python
3030
31-
>>> from sqlalchemy_cratedb import CrateDialect
31+
>>> from sqlalchemy_cratedb import dialect
3232
3333
Set up as a dependency
3434
======================

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ documentation = "https://github.com/crate-workbench/sqlalchemy-cratedb"
121121
homepage = "https://github.com/crate-workbench/sqlalchemy-cratedb"
122122
repository = "https://github.com/crate-workbench/sqlalchemy-cratedb"
123123
[project.entry-points."sqlalchemy.dialects"]
124-
crate = "sqlalchemy_cratedb:CrateDialect"
124+
crate = "sqlalchemy_cratedb:dialect"
125125

126126
[tool.black]
127127
line-length = 100

src/sqlalchemy_cratedb/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# software solely pursuant to the terms of the relevant commercial agreement.
2121

2222
from .compat.api13 import monkeypatch_add_exec_driver_sql
23-
from .dialect import CrateDialect
23+
from .dialect import dialect
2424
from .predicate import match
2525
from .sa_version import SA_1_4, SA_2_0, SA_VERSION
2626
from .support import insert_bulk
@@ -50,7 +50,7 @@
5050

5151

5252
__all__ = [
53-
CrateDialect,
53+
dialect,
5454
Geopoint,
5555
Geoshape,
5656
ObjectArray,

src/sqlalchemy_cratedb/dialect.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,3 +367,6 @@ def has_ilike_operator(self):
367367
class DateTrunc(functions.GenericFunction):
368368
name = "date_trunc"
369369
type = sqltypes.TIMESTAMP
370+
371+
372+
dialect = CrateDialect

0 commit comments

Comments
 (0)