From 425c42b525697d7661f061fb7c88f61967db803c Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 10 Jun 2024 18:36:50 -0400 Subject: [PATCH 1/2] Add new ColumnOperator method names from SQLAlchemy 1.4 (#237) --- sqlalchemy-stubs/sql/operators.pyi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sqlalchemy-stubs/sql/operators.pyi b/sqlalchemy-stubs/sql/operators.pyi index 89a08e1..6feccc0 100644 --- a/sqlalchemy-stubs/sql/operators.pyi +++ b/sqlalchemy-stubs/sql/operators.pyi @@ -31,6 +31,7 @@ class ColumnOperators(Operators): def __eq__(self, other): ... def __ne__(self, other): ... def is_distinct_from(self, other): ... + def is_not_distinct_from(self, other): ... def isnot_distinct_from(self, other): ... def __gt__(self, other): ... def __ge__(self, other): ... @@ -43,10 +44,14 @@ class ColumnOperators(Operators): def like(self, other: Text, escape: Optional[Any] = ...): ... def ilike(self, other: Text, escape: Optional[Any] = ...): ... def in_(self, other: Union[Iterable[Any], BindParameter, Select, Alias]): ... + def not_in(self, other: Union[Iterable[Any], BindParameter, Select, Alias]): ... def notin_(self, other: Union[Iterable[Any], BindParameter, Select, Alias]): ... + def not_like(self, other, escape: Optional[Any] = ...): ... def notlike(self, other, escape: Optional[Any] = ...): ... + def not_ilike(self, other, escape: Optional[Any] = ...): ... def notilike(self, other, escape: Optional[Any] = ...): ... def is_(self, other): ... + def is_not(self, other): ... def isnot(self, other): ... def startswith(self, other: str, **kwargs): ... def endswith(self, other, **kwargs): ... @@ -54,7 +59,9 @@ class ColumnOperators(Operators): def match(self, other, **kwargs): ... def desc(self) -> UnaryExpression: ... def asc(self) -> UnaryExpression: ... + def nulls_first(self): ... def nullsfirst(self): ... + def nulls_last(self): ... def nullslast(self): ... def collate(self, collation): ... def __radd__(self, other): ... From 63b8dd8d830b67642f5b15ef0291a62563710ec5 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 10 Jun 2024 18:41:53 -0400 Subject: [PATCH 2/2] Add new operator function names from SQLAlchemy 1.4 (#237) --- sqlalchemy-stubs/sql/operators.pyi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sqlalchemy-stubs/sql/operators.pyi b/sqlalchemy-stubs/sql/operators.pyi index 6feccc0..37d5ac1 100644 --- a/sqlalchemy-stubs/sql/operators.pyi +++ b/sqlalchemy-stubs/sql/operators.pyi @@ -84,11 +84,15 @@ class ColumnOperators(Operators): def from_(): ... def as_(): ... def exists(): ... +def is_true(a): ... def istrue(a): ... +def is_false(a): ... def isfalse(a): ... def is_distinct_from(a, b): ... +def is_not_distinct_from(a, b): ... def isnot_distinct_from(a, b): ... def is_(a, b): ... +def is_not(a, b): ... def isnot(a, b): ... def collate(a, b): ... def op(a, opstring, b): ... @@ -97,25 +101,33 @@ def notlike_op(a, b, escape: Optional[Any] = ...): ... def ilike_op(a, b, escape: Optional[Any] = ...): ... def notilike_op(a, b, escape: Optional[Any] = ...): ... def between_op(a, b, c, symmetric: bool = ...): ... +def not_between_op(a, b, c, symmetric: bool = ...): ... def notbetween_op(a, b, c, symmetric: bool = ...): ... def in_op(a, b): ... +def not_in_op(a, b): ... def notin_op(a, b): ... def distinct_op(a): ... def any_op(a): ... def all_op(a): ... def startswith_op(a, b, escape: Optional[Any] = ...): ... +def not_startswith_op(a, b, escape: Optional[Any] = ...): ... def notstartswith_op(a, b, escape: Optional[Any] = ...): ... def endswith_op(a, b, escape: Optional[Any] = ...): ... +def not_endswith_op(a, b, escape: Optional[Any] = ...): ... def notendswith_op(a, b, escape: Optional[Any] = ...): ... def contains_op(a, b, escape: Optional[Any] = ...): ... +def not_contains_op(a, b, escape: Optional[Any] = ...): ... def notcontains_op(a, b, escape: Optional[Any] = ...): ... def match_op(a, b, **kw): ... +def not_match_op(a, b, **kw): ... def notmatch_op(a, b, **kw): ... def comma_op(a, b): ... def concat_op(a, b): ... def desc_op(a): ... def asc_op(a): ... +def nulls_first_op(a): ... def nullsfirst_op(a): ... +def nulls_last_op(a): ... def nullslast_op(a): ... def json_getitem_op(a, b): ... def json_path_getitem_op(a, b): ...