class Computed(FetchedValue, SchemaItem):
Defines a generated column, i.e. "GENERATED ALWAYS AS" syntax.
The .Computed
construct is an inline construct added to the
argument list of a _schema.Column
object:
from sqlalchemy import Computed Table('square', metadata_obj, Column('side', Float, nullable=False), Column('area', Float, Computed('side * side')) )
See the linked documentation below for complete details.
See Also
Method | __init__ |
Construct a GENERATED ALWAYS AS DDL construct to accompany a _schema.Column . |
Method | _as_for_update |
Undocumented |
Method | _copy |
Undocumented |
Method | _set_parent |
Associate with this SchemaEvent's parent object. |
Method | copy |
Undocumented |
Class Variable | __visit_name__ |
Undocumented |
Instance Variable | column |
Undocumented |
Instance Variable | persisted |
Undocumented |
Instance Variable | sqltext |
Undocumented |
Inherited from FetchedValue
:
Method | __repr__ |
Undocumented |
Method | _clone |
Undocumented |
Class Variable | has_argument |
Undocumented |
Class Variable | is_clause_element |
Undocumented |
Class Variable | is_server_default |
Undocumented |
Class Variable | reflected |
Undocumented |
Instance Variable | for_update |
Undocumented |
Inherited from SchemaEventTarget
(via FetchedValue
):
Method | _set_parent_with_dispatch |
Undocumented |
Inherited from SchemaItem
:
Method | __repr__ |
Undocumented |
Method | _init_items |
Initialize the list of child items for this SchemaItem. |
Method | _schema_item_copy |
Undocumented |
Class Variable | _use_schema_map |
Undocumented |
Class Variable | create_drop_stringify_dialect |
Undocumented |
Property | info |
Info dictionary associated with the object, allowing user-defined data to be associated with this .SchemaItem . |
Inherited from SchemaEventTarget
(via SchemaItem
):
Method | _set_parent_with_dispatch |
Undocumented |
Inherited from Traversible
(via SchemaItem
):
Method | get_children |
Return immediate child .visitors.Traversible elements of this .visitors.Traversible . |
Method | __class_getitem__ |
Undocumented |
_schema.Column
.Parameters | |
sqltext | A string containing the column generation expression, which will be
used verbatim, or a SQL expression construct, such as a
_expression.text
object. If given as a string, the object is converted to a
_expression.text object. |
persisted | Optional, controls how this column should be persisted by the database. Possible values are:
Specifying True or False may raise an error when the DDL is emitted to the target database if the database does not support that persistence option. Leaving this parameter at its default of None is guaranteed to succeed for all databases that support GENERATED ALWAYS AS. |
Undocumented