summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/selectable.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/sql/selectable.py')
-rw-r--r--lib/sqlalchemy/sql/selectable.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/selectable.py b/lib/sqlalchemy/sql/selectable.py
index a6ed6b0ce..a1e3abcb4 100644
--- a/lib/sqlalchemy/sql/selectable.py
+++ b/lib/sqlalchemy/sql/selectable.py
@@ -1841,6 +1841,19 @@ class ForUpdateArg(ClauseElement):
else:
return True
+ def __eq__(self, other):
+ return (
+ isinstance(other, ForUpdateArg) and
+ other.nowait == self.nowait and
+ other.read == self.read and
+ other.skip_locked == self.skip_locked and
+ other.key_share == self.key_share and
+ other.of is self.of
+ )
+
+ def __hash__(self):
+ return id(self)
+
def _copy_internals(self, clone=_clone, **kw):
if self.of is not None:
self.of = [clone(col, **kw) for col in self.of]