MCPcopy Index your code
hub / github.com/sqlalchemy/sqlalchemy / create

Method create

lib/sqlalchemy/dialects/postgresql/named_types.py:43–57  ·  view source on GitHub ↗

Emit ``CREATE`` DDL for this type. :param bind: a connectable :class:`_engine.Engine`, :class:`_engine.Connection`, or similar object to emit SQL. :param checkfirst: if ``True``, a query against the PG catalog will be first performed to see if the

(
        self, bind: _CreateDropBind, checkfirst: bool = True, **kw: Any
    )

Source from the content-addressed store, hash-verified

41 create_type: bool
42
43 def create(
44 self, bind: _CreateDropBind, checkfirst: bool = True, **kw: Any
45 ) -> None:
46 """Emit ``CREATE`` DDL for this type.
47
48 :param bind: a connectable :class:`_engine.Engine`,
49 :class:`_engine.Connection`, or similar object to emit
50 SQL.
51 :param checkfirst: if ``True``, a query against
52 the PG catalog will be first performed to see
53 if the type does not exist already before
54 creating.
55
56 """
57 bind._run_ddl_visitor(self.DDLGenerator, self, checkfirst=checkfirst)
58
59 def drop(
60 self, bind: _CreateDropBind, checkfirst: bool = True, **kw: Any

Callers 2

_on_table_createMethod · 0.95
_on_metadata_createMethod · 0.95

Calls 1

_run_ddl_visitorMethod · 0.45

Tested by

no test coverage detected