summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/base.py
diff options
context:
space:
mode:
authorjonathan vanasco <jonathan@2xlp.com>2020-10-28 14:35:39 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2020-10-30 10:02:29 -0400
commit9ddbd585a62ff1ad56e9ee6fef5898ced1932a88 (patch)
treea1ba46d4c8fb5981062a22775fa73155532018e6 /lib/sqlalchemy/dialects/postgresql/base.py
parent10851b002844fa4f9de7af92dbb15cb1133497eb (diff)
downloadsqlalchemy-9ddbd585a62ff1ad56e9ee6fef5898ced1932a88.tar.gz
Apply underscore naming to several more operators
The operator changes are: * `isfalse` is now `is_false` * `isnot_distinct_from` is now `is_not_distinct_from` * `istrue` is now `is_true` * `notbetween` is now `not_between` * `notcontains` is now `not_contains` * `notendswith` is now `not_endswith` * `notilike` is now `not_ilike` * `notlike` is now `not_like` * `notmatch` is now `not_match` * `notstartswith` is now `not_startswith` * `nullsfirst` is now `nulls_first` * `nullslast` is now `nulls_last` Because these are core operators, the internal migration strategy for this change is to support legacy terms for an extended period of time -- if not indefinitely -- but update all documentation, tutorials, and internal usage to the new terms. The new terms are used to define the functions, and the legacy terms have been deprecated into aliases of the new terms. Fixes: #5435 Change-Id: Ifbd7cb1cdda5981990243c4fc4b4ff467dc132ac
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/base.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py
index ea6921b2d..391361e23 100644
--- a/lib/sqlalchemy/dialects/postgresql/base.py
+++ b/lib/sqlalchemy/dialects/postgresql/base.py
@@ -1865,7 +1865,7 @@ class PGCompiler(compiler.SQLCompiler):
else ""
)
- def visit_notilike_op_binary(self, binary, operator, **kw):
+ def visit_not_ilike_op_binary(self, binary, operator, **kw):
escape = binary.modifiers.get("escape", None)
return "%s NOT ILIKE %s" % (
self.process(binary.left, **kw),
@@ -3850,10 +3850,10 @@ class PGDialect(default.DefaultDialect):
if col_flags & 0x01:
col_sorting += ("desc",)
if not (col_flags & 0x02):
- col_sorting += ("nullslast",)
+ col_sorting += ("nulls_last",)
else:
if col_flags & 0x02:
- col_sorting += ("nullsfirst",)
+ col_sorting += ("nulls_first",)
if col_sorting:
sorting[col_idx] = col_sorting
if sorting: