diff options
| author | mike bayer <mike_mp@zzzcomputing.com> | 2023-05-10 20:15:15 +0000 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@bbpush.zzzcomputing.com> | 2023-05-10 20:15:15 +0000 |
| commit | 4f52073370ae2a563fdc3fe05d87ee1ea4ee901d (patch) | |
| tree | 1f1b87086516abe7dbc5f4f5a6734aa929f0e00a /lib/sqlalchemy/sql | |
| parent | bce61160a9aec321ea0af4a59d4b83ff93a0429f (diff) | |
| parent | 189039b9d38343b482f1b077bbcf6f6ae99cbacd (diff) | |
| download | sqlalchemy-4f52073370ae2a563fdc3fe05d87ee1ea4ee901d.tar.gz | |
Merge "add full parameter types for ORM with_for_update" into main
Diffstat (limited to 'lib/sqlalchemy/sql')
| -rw-r--r-- | lib/sqlalchemy/sql/selectable.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/selectable.py b/lib/sqlalchemy/sql/selectable.py index 8a371951e..19d464180 100644 --- a/lib/sqlalchemy/sql/selectable.py +++ b/lib/sqlalchemy/sql/selectable.py @@ -3067,6 +3067,9 @@ class TableClause(roles.DMLTableRole, Immutable, NamedFromClause): return [self] +ForUpdateParameter = Union["ForUpdateArg", None, bool, Dict[str, Any]] + + class ForUpdateArg(ClauseElement): _traverse_internals: _TraverseInternalsType = [ ("of", InternalTraversal.dp_clauseelement_list), @@ -3082,7 +3085,7 @@ class ForUpdateArg(ClauseElement): @classmethod def _from_argument( - cls, with_for_update: Union[ForUpdateArg, None, bool, Dict[str, Any]] + cls, with_for_update: ForUpdateParameter ) -> Optional[ForUpdateArg]: if isinstance(with_for_update, ForUpdateArg): return with_for_update |
