Skip to content

Commit 3bc6b7f

Browse files
committed
Chore: Rename module to sqlalchemy_cratedb.predicate (singular)
1 parent 189ae2d commit 3bc6b7f

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

docs/advanced-querying.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Fulltext search in CrateDB is performed using :ref:`crate-reference:predicates_m
113113
The CrateDB SQLAlchemy dialect comes with a ``match`` function, which can be used to
114114
search on one or multiple fields.
115115

116-
>>> from sqlalchemy_cratedb.predicates import match
116+
>>> from sqlalchemy_cratedb import match
117117

118118
>>> session.query(Character.name) \
119119
... .filter(match(Character.name_ft, 'Arthur')) \

docs/overview.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -588,12 +588,12 @@ Matching
588588

589589
Fulltext Search in CrateDB is done with the :ref:`crate-reference:predicates_match`.
590590

591-
The CrateDB SQLAlchemy dialect provides a ``match`` function in the
592-
``predicates`` module, which can be used to search one or multiple fields.
591+
The CrateDB SQLAlchemy dialect provides a ``match`` function, which can be used
592+
to search one or multiple fields.
593593

594594
Here's an example use of the ``match`` function:
595595

596-
>>> from sqlalchemy_cratedb.predicates import match
596+
>>> from sqlalchemy_cratedb import match
597597

598598
>>> session.query(Character.name) \
599599
... .filter(match(Character.name_ft, 'Arthur')) \

src/sqlalchemy_cratedb/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
from .compat.api13 import monkeypatch_add_exec_driver_sql
2323
from .dialect import CrateDialect
24+
from .predicate import match
2425
from .sa_version import SA_1_4, SA_2_0, SA_VERSION
2526
from .support import insert_bulk
2627
from .type.array import ObjectArray
@@ -54,4 +55,5 @@
5455
Geoshape,
5556
ObjectArray,
5657
ObjectType,
58+
match,
5759
]

tests/match_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
from sqlalchemy.ext.declarative import declarative_base
3232

3333
from sqlalchemy_cratedb import ObjectType
34-
from sqlalchemy_cratedb.predicates import match
34+
from sqlalchemy_cratedb.predicate import match
3535
from crate.client.cursor import Cursor
3636

3737

0 commit comments

Comments
 (0)