Set the table create DDL for this :class:`.Table`. This allows the CREATE TABLE statement to be controlled or replaced entirely when :meth:`.Table.create` or :meth:`.MetaData.create_all` is used. E.g.:: from sqlalchemy.schema import CreateTable
(self, ddl: TableCreateDDL)
| 1025 | ) |
| 1026 | |
| 1027 | def set_creator_ddl(self, ddl: TableCreateDDL) -> None: |
| 1028 | """Set the table create DDL for this :class:`.Table`. |
| 1029 | |
| 1030 | This allows the CREATE TABLE statement to be controlled or replaced |
| 1031 | entirely when :meth:`.Table.create` or :meth:`.MetaData.create_all` is |
| 1032 | used. |
| 1033 | |
| 1034 | E.g.:: |
| 1035 | |
| 1036 | from sqlalchemy.schema import CreateTable |
| 1037 | |
| 1038 | table.set_creator_ddl(CreateTable(table, if_not_exists=True)) |
| 1039 | |
| 1040 | .. versionadded:: 2.1 |
| 1041 | |
| 1042 | .. seealso:: |
| 1043 | |
| 1044 | :meth:`.Table.set_dropper_ddl` |
| 1045 | |
| 1046 | """ |
| 1047 | self._creator_ddl = ddl |
| 1048 | |
| 1049 | def set_dropper_ddl(self, ddl: TableDropDDL) -> None: |
| 1050 | """Set the table drop DDL for this :class:`.Table`. |
no outgoing calls