diff options
| author | mike bayer <mike_mp@zzzcomputing.com> | 2021-04-20 17:04:57 +0000 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@ci3.zzzcomputing.com> | 2021-04-20 17:04:57 +0000 |
| commit | 3580e6ed33451505e2462ffcb1beaf96f851b011 (patch) | |
| tree | 2163b2ee1fc3b280bf1804e4e6b76f29f2de644e /lib/sqlalchemy/sql | |
| parent | 033e673f8771dfb20dd7b67a780c6ef3d3210e37 (diff) | |
| parent | adc950945025d436ef97095b4e706700ebae34ff (diff) | |
| download | sqlalchemy-3580e6ed33451505e2462ffcb1beaf96f851b011.tar.gz | |
Merge "Derive `next_value.type` from `Sequence.data_type` if available"
Diffstat (limited to 'lib/sqlalchemy/sql')
| -rw-r--r-- | lib/sqlalchemy/sql/functions.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/functions.py b/lib/sqlalchemy/sql/functions.py index d71926a1f..02ed55100 100644 --- a/lib/sqlalchemy/sql/functions.py +++ b/lib/sqlalchemy/sql/functions.py @@ -1064,6 +1064,9 @@ class next_value(GenericFunction): ), "next_value() accepts a Sequence object as input." self._bind = self._get_bind(kw) self.sequence = seq + self.type = sqltypes.to_instance( + seq.data_type or getattr(self, "type", None) + ) def compare(self, other, **kw): return ( |
