MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / add_seq

Function add_seq

lib/sqlalchemy/testing/schema.py:75–83  ·  view source on GitHub ↗
(c, tbl)

Source from the content-addressed store, hash-verified

73 if exclusions.against(config._current, "oracle"):
74
75 def add_seq(c, tbl):
76 c._init_items(
77 schema.Sequence(
78 _truncate_name(
79 config.db.dialect, tbl.name + "_" + c.name + "_seq"
80 ),
81 optional=True,
82 )
83 )
84
85 event.listen(col, "after_parent_attach", add_seq, propagate=True)
86 return construct

Callers

nothing calls this directly

Calls 2

_truncate_nameFunction · 0.85
_init_itemsMethod · 0.80

Tested by

no test coverage detected