class documentation

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_name__ Undocumented
Class Variable is_callable Undocumented
Class Variable is_clause_element Undocumented
Class Variable is_scalar Undocumented
Class Variable is_sequence Undocumented
Class Variable is_server_default Undocumented
Instance Variable column Undocumented
Instance Variable for_update Undocumented
Method _copy Undocumented
Method _execute_on_connection Undocumented
Method _execute_on_scalar Undocumented
Method _set_parent Associate with this SchemaEvent's parent object.
Class Variable _is_default_generator Undocumented

Inherited from Executable (via DefaultGenerator):

Method execution_options Set non-SQL options for the statement which take effect during execution.
Method get_execution_options Get the non-SQL options which will take effect during execution.
Method options Apply options to this statement.
Class Variable is_delete Undocumented
Class Variable is_dml Undocumented
Class Variable is_insert Undocumented
Class Variable is_select Undocumented
Class Variable is_text Undocumented
Class Variable is_update Undocumented
Class Variable supports_execution Undocumented
Method _add_context_option Add a context option to this statement.
Method _compile_w_cache Undocumented
Method _set_compile_options Assign the compile options to a new value.
Method _update_compile_options update the _compile_options with new keys.
Class Variable _executable_traverse_internals Undocumented
Class Variable _with_context_options Undocumented
Class Variable _with_options Undocumented
Instance Variable _compile_options Undocumented
Instance Variable _execution_options Undocumented
Property _all_selected_columns Undocumented
Property _effective_plugin_target Undocumented

Inherited from StatementRole (via DefaultGenerator, Executable):

Class Variable __slots__ Undocumented
Class Variable _role_name Undocumented
Property _propagate_attrs Undocumented

Inherited from SQLRole (via DefaultGenerator, Executable, StatementRole):

Class Variable allows_lambda Undocumented
Class Variable uses_inspection Undocumented

Inherited from SchemaItem (via DefaultGenerator, Executable, StatementRole, SQLRole):

Class Variable create_drop_stringify_dialect Undocumented
Property info Info dictionary associated with the object, allowing user-defined data to be associated with this :class:`.SchemaItem`.
Method _init_items Initialize the list of child items for this SchemaItem.
Method _schema_item_copy Undocumented
Class Variable _use_schema_map Undocumented

Inherited from SchemaEventTarget (via DefaultGenerator, Executable, StatementRole, SQLRole, SchemaItem):

Class Variable dispatch Undocumented
Method _set_parent_with_dispatch Undocumented

Inherited from Visitable (via DefaultGenerator, Executable, StatementRole, SQLRole, SchemaItem, SchemaEventTarget, EventTarget):

Method __class_getitem__ Undocumented
Method __init_subclass__ Undocumented
Class Method _generate_compiler_dispatch Undocumented
Method _compiler_dispatch Undocumented
Class Variable _original_compiler_dispatch Undocumented
@overload
def __new__(cls, arg: Callable[..., Any], for_update: bool = ...) -> CallableColumnDefault:
@overload
def __new__(cls, arg: ColumnElement[Any], for_update: bool = ...) -> ColumnElementColumnDefault:
@overload
def __new__(cls, arg: object, for_update: bool = ...) -> ColumnDefault:
(source)

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.

def __repr__(self) -> str: (source)