MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / define_tables

Method define_tables

test/ext/test_mutable.py:1277–1289  ·  view source on GitHub ↗
(cls, metadata)

Source from the content-addressed store, hash-verified

1275
1276 @classmethod
1277 def define_tables(cls, metadata):
1278 from sqlalchemy.sql.sqltypes import ARRAY
1279
1280 MutableList = cls._type_fixture()
1281
1282 Base = declarative_base(metadata=metadata)
1283
1284 class Mixin:
1285 data = Column(MutableList.as_mutable(ARRAY(Integer)))
1286
1287 class Foo(Mixin, Base):
1288 __tablename__ = "foo"
1289 id = Column(Integer, primary_key=True)
1290
1291 def test_in_place_mutation_str(self):
1292 """this test is hardcoded to integer, skip strings"""

Callers

nothing calls this directly

Calls 2

declarative_baseFunction · 0.90
_type_fixtureMethod · 0.45

Tested by

no test coverage detected