), "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 (
import sqlalchemy as sa
+from sqlalchemy import BigInteger
from sqlalchemy import Integer
from sqlalchemy import MetaData
from sqlalchemy import Sequence
is_false(testing.db.dialect.has_table(connection, "table_1"))
is_false(testing.db.dialect.has_table(connection, "table_2"))
+ def test_next_value_type(self):
+ seq = Sequence("my_sequence", data_type=BigInteger)
+ assert isinstance(seq.next_value().type, BigInteger)
+
class FutureSequenceTest(fixtures.FutureEngineMixin, SequenceTest):
__requires__ = ("sequences",)