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

Method define_tables

test/orm/test_unitofworkv2.py:3138–3158  ·  view source on GitHub ↗
(
        self, metadata, connection, implicit_returning_variations
    )

Source from the content-addressed store, hash-verified

3136
3137 @testing.fixture
3138 def define_tables(
3139 self, metadata, connection, implicit_returning_variations
3140 ):
3141 implicit_returning = bool(implicit_returning_variations)
3142
3143 t = Table(
3144 "test",
3145 metadata,
3146 Column(
3147 "id", Integer, primary_key=True, test_needs_autoincrement=True
3148 ),
3149 Column(
3150 "foo",
3151 Integer,
3152 server_default="3",
3153 ),
3154 Column("bar", Integer, server_onupdate=FetchedValue()),
3155 implicit_returning=implicit_returning,
3156 )
3157 metadata.create_all(connection)
3158 return t
3159
3160 @testing.fixture
3161 def setup_mappers(

Callers

nothing calls this directly

Calls 4

TableClass · 0.90
ColumnClass · 0.90
FetchedValueClass · 0.90
create_allMethod · 0.80

Tested by

no test coverage detected