r""" Construct a new ``Column`` object. :param name: The name of this column as represented in the database. This argument may be the first positional argument, or specified via keyword. Names which contain no upper case characters will be tr
(
self,
__name_pos: Optional[
Union[str, _TypeEngineArgument[_T], SchemaEventTarget]
] = None,
__type_pos: Optional[
Union[_TypeEngineArgument[_T], SchemaEventTarget]
] = None,
/,
*args: SchemaEventTarget,
name: Optional[str] = None,
type_: Optional[_TypeEngineArgument[_T]] = None,
autoincrement: _AutoIncrementType = "auto",
default: Optional[Any] = _NoArg.NO_ARG,
insert_default: Optional[Any] = _NoArg.NO_ARG,
doc: Optional[str] = None,
key: Optional[str] = None,
index: Optional[bool] = None,
unique: Optional[bool] = None,
info: Optional[_InfoType] = None,
nullable: Optional[
Union[bool, Literal[SchemaConst.NULL_UNSPECIFIED]]
] = SchemaConst.NULL_UNSPECIFIED,
onupdate: Optional[Any] = None,
primary_key: bool = False,
server_default: Optional[_ServerDefaultArgument] = None,
server_onupdate: Optional[_ServerOnUpdateArgument] = None,
quote: Optional[bool] = None,
system: bool = False,
comment: Optional[str] = None,
insert_sentinel: bool = False,
_omit_from_statements: bool = False,
_proxies: Optional[Any] = None,
**dialect_kwargs: Any,
)
| 1778 | server_default: Optional[FetchedValue] |
| 1779 | |
| 1780 | def __init__( |
| 1781 | self, |
| 1782 | __name_pos: Optional[ |
| 1783 | Union[str, _TypeEngineArgument[_T], SchemaEventTarget] |
| 1784 | ] = None, |
| 1785 | __type_pos: Optional[ |
| 1786 | Union[_TypeEngineArgument[_T], SchemaEventTarget] |
| 1787 | ] = None, |
| 1788 | /, |
| 1789 | *args: SchemaEventTarget, |
| 1790 | name: Optional[str] = None, |
| 1791 | type_: Optional[_TypeEngineArgument[_T]] = None, |
| 1792 | autoincrement: _AutoIncrementType = "auto", |
| 1793 | default: Optional[Any] = _NoArg.NO_ARG, |
| 1794 | insert_default: Optional[Any] = _NoArg.NO_ARG, |
| 1795 | doc: Optional[str] = None, |
| 1796 | key: Optional[str] = None, |
| 1797 | index: Optional[bool] = None, |
| 1798 | unique: Optional[bool] = None, |
| 1799 | info: Optional[_InfoType] = None, |
| 1800 | nullable: Optional[ |
| 1801 | Union[bool, Literal[SchemaConst.NULL_UNSPECIFIED]] |
| 1802 | ] = SchemaConst.NULL_UNSPECIFIED, |
| 1803 | onupdate: Optional[Any] = None, |
| 1804 | primary_key: bool = False, |
| 1805 | server_default: Optional[_ServerDefaultArgument] = None, |
| 1806 | server_onupdate: Optional[_ServerOnUpdateArgument] = None, |
| 1807 | quote: Optional[bool] = None, |
| 1808 | system: bool = False, |
| 1809 | comment: Optional[str] = None, |
| 1810 | insert_sentinel: bool = False, |
| 1811 | _omit_from_statements: bool = False, |
| 1812 | _proxies: Optional[Any] = None, |
| 1813 | **dialect_kwargs: Any, |
| 1814 | ): |
| 1815 | r""" |
| 1816 | Construct a new ``Column`` object. |
| 1817 | |
| 1818 | :param name: The name of this column as represented in the database. |
| 1819 | This argument may be the first positional argument, or specified |
| 1820 | via keyword. |
| 1821 | |
| 1822 | Names which contain no upper case characters |
| 1823 | will be treated as case insensitive names, and will not be quoted |
| 1824 | unless they are a reserved word. Names with any number of upper |
| 1825 | case characters will be quoted and sent exactly. Note that this |
| 1826 | behavior applies even for databases which standardize upper |
| 1827 | case names as case insensitive such as Oracle Database. |
| 1828 | |
| 1829 | The name field may be omitted at construction time and applied |
| 1830 | later, at any time before the Column is associated with a |
| 1831 | :class:`_schema.Table`. This is to support convenient |
| 1832 | usage within the :mod:`~sqlalchemy.ext.declarative` extension. |
| 1833 | |
| 1834 | :param type\_: The column's type, indicated using an instance which |
| 1835 | subclasses :class:`~sqlalchemy.types.TypeEngine`. If no arguments |
| 1836 | are required for the type, the class of the type can be sent |
| 1837 | as well, e.g.:: |
nothing calls this directly
no test coverage detected