class ColumnDefault(DefaultGenerator, ABC): (source)
Known subclasses: sqlalchemy.sql.schema.CallableColumnDefault
, sqlalchemy.sql.schema.ColumnElementColumnDefault
, sqlalchemy.sql.schema.ScalarElementColumnDefault
A plain default value on a column. This could correspond to a constant, a callable function, or a SQL clause. :class:`.ColumnDefault` is generated automatically whenever the ``default``, ``onupdate`` arguments of :class:`_schema.Column` are used. A :class:`.ColumnDefault` can be passed positionally as well. For example, the following:: Column('foo', Integer, default=50) Is equivalent to:: Column('foo', Integer, ColumnDefault(50))
Method | __new__ |
Construct a new :class:`.ColumnDefault`. |
Method | __repr__ |
Undocumented |
Class Variable | arg |
Undocumented |
Inherited from DefaultGenerator
:
Method | __init__ |
Undocumented |
Class Variable | __visit |
Undocumented |
Class Variable | is |
Undocumented |
Class Variable | is |
Undocumented |
Class Variable | is |
Undocumented |
Class Variable | is |
Undocumented |
Class Variable | is |
Undocumented |
Instance Variable | column |
Undocumented |
Instance Variable | for |
Undocumented |
Method | _copy |
Undocumented |
Method | _execute |
Undocumented |
Method | _execute |
Undocumented |
Method | _set |
Associate with this SchemaEvent's parent object. |
Class Variable | _is |
Undocumented |
Inherited from Executable
(via DefaultGenerator
):
Method | execution |
Set non-SQL options for the statement which take effect during execution. |
Method | get |
Get the non-SQL options which will take effect during execution. |
Method | options |
Apply options to this statement. |
Class Variable | is |
Undocumented |
Class Variable | is |
Undocumented |
Class Variable | is |
Undocumented |
Class Variable | is |
Undocumented |
Class Variable | is |
Undocumented |
Class Variable | is |
Undocumented |
Class Variable | supports |
Undocumented |
Method | _add |
Add a context option to this statement. |
Method | _compile |
Undocumented |
Method | _set |
Assign the compile options to a new value. |
Method | _update |
update the _compile_options with new keys. |
Class Variable | _executable |
Undocumented |
Class Variable | _with |
Undocumented |
Class Variable | _with |
Undocumented |
Instance Variable | _compile |
Undocumented |
Instance Variable | _execution |
Undocumented |
Property | _all |
Undocumented |
Property | _effective |
Undocumented |
Inherited from StatementRole
(via DefaultGenerator
, Executable
):
Class Variable | __slots__ |
Undocumented |
Class Variable | _role |
Undocumented |
Property | _propagate |
Undocumented |
Inherited from SQLRole
(via DefaultGenerator
, Executable
, StatementRole
):
Class Variable | allows |
Undocumented |
Class Variable | uses |
Undocumented |
Inherited from SchemaItem
(via DefaultGenerator
, Executable
, StatementRole
, SQLRole
):
Class Variable | create |
Undocumented |
Property | info |
Info dictionary associated with the object, allowing user-defined data to be associated with this :class:`.SchemaItem`. |
Method | _init |
Initialize the list of child items for this SchemaItem. |
Method | _schema |
Undocumented |
Class Variable | _use |
Undocumented |
Inherited from SchemaEventTarget
(via DefaultGenerator
, Executable
, StatementRole
, SQLRole
, SchemaItem
):
Class Variable | dispatch |
Undocumented |
Method | _set |
Undocumented |
Inherited from Visitable
(via DefaultGenerator
, Executable
, StatementRole
, SQLRole
, SchemaItem
, SchemaEventTarget
, EventTarget
):
Method | __class |
Undocumented |
Method | __init |
Undocumented |
Class Method | _generate |
Undocumented |
Method | _compiler |
Undocumented |
Class Variable | _original |
Undocumented |
Construct a new :class:`.ColumnDefault`. :param arg: argument representing the default value. May be one of the following: * a plain non-callable Python value, such as a string, integer, boolean, or other simple type. The default value will be used as is each time. * a SQL expression, that is one which derives from :class:`_expression.ColumnElement`. The SQL expression will be rendered into the INSERT or UPDATE statement, or in the case of a primary key column when RETURNING is not used may be pre-executed before an INSERT within a SELECT. * A Python callable. The function will be invoked for each new row subject to an INSERT or UPDATE. The callable must accept exactly zero or one positional arguments. The one-argument form will receive an instance of the :class:`.ExecutionContext`, which provides contextual information as to the current :class:`_engine.Connection` in use as well as the current statement and parameters.