class documentation

class index_property(hybrid_property): (source)

View In Hierarchy

A property generator. The generated property describes an object attribute that corresponds to an :class:`_types.Indexable` column. .. versionadded:: 1.1 .. seealso:: :mod:`sqlalchemy.ext.indexable`

Method __init__ Create a new :class:`.index_property`.
Method expr Undocumented
Method fdel Undocumented
Method fget Undocumented
Method fset Undocumented
Instance Variable attr_name Undocumented
Instance Variable datatype Undocumented
Instance Variable default Undocumented
Instance Variable index Undocumented
Instance Variable onebased Undocumented
Method _fget_default Undocumented
Constant _NO_DEFAULT_ARGUMENT Undocumented

Inherited from hybrid_property:

Method __delete__ Undocumented
Method __get__ Undocumented
Method __set__ Undocumented
Method comparator Provide a modifying decorator that defines a custom comparator producing method.
Method deleter Provide a modifying decorator that defines a deletion method.
Method expression Provide a modifying decorator that defines a SQL-expression producing method.
Method getter Provide a modifying decorator that defines a getter method.
Method setter Provide a modifying decorator that defines a setter method.
Method update_expression Provide a modifying decorator that defines an UPDATE tuple producing method.
Class Variable __name__ Undocumented
Class Variable is_attribute True if this object is a Python :term:`descriptor`.
Instance Variable custom_comparator Undocumented
Instance Variable update_expr Undocumented
Property inplace Return the inplace mutator for this :class:`.hybrid_property`.
Property overrides Prefix for a method that is overriding an existing attribute.
Class _InPlace A builder helper for .hybrid_property.
Method _copy Undocumented
Method _get_comparator Undocumented
Method _get_expr Undocumented
Property _expr_comparator Undocumented

Inherited from InspectionAttrInfo (via hybrid_property):

Class Variable __slots__ Undocumented
Property info Info dictionary associated with the object, allowing user-defined data to be associated with this :class:`.InspectionAttr`.

Inherited from InspectionAttr (via hybrid_property, InspectionAttrInfo):

Class Variable is_aliased_class True if this object is an instance of :class:`.AliasedClass`.
Class Variable is_bundle True if this object is an instance of :class:`.Bundle`.
Class Variable is_clause_element True if this object is an instance of :class:`_expression.ClauseElement`.
Class Variable is_instance True if this object is an instance of :class:`.InstanceState`.
Class Variable is_mapper True if this object is an instance of :class:`_orm.Mapper`.
Class Variable is_property True if this object is an instance of :class:`.MapperProperty`.
Class Variable is_selectable Return True if this object is an instance of :class:`_expression.Selectable`.
Class Variable _is_internal_proxy True if this object is an internal proxy object.
def __init__(self, attr_name, index, default=_NO_DEFAULT_ARGUMENT, datatype=None, mutable=True, onebased=True): (source)

Create a new :class:`.index_property`. :param attr_name: An attribute name of an `Indexable` typed column, or other attribute that returns an indexable structure. :param index: The index to be used for getting and setting this value. This should be the Python-side index value for integers. :param default: A value which will be returned instead of `AttributeError` when there is not a value at given index. :param datatype: default datatype to use when the field is empty. By default, this is derived from the type of index used; a Python list for an integer index, or a Python dictionary for any other style of index. For a list, the list will be initialized to a list of None values that is at least ``index`` elements long. :param mutable: if False, writes and deletes to the attribute will be disallowed. :param onebased: assume the SQL representation of this value is one-based; that is, the first index in SQL is 1, not zero.

def expr(self, model): (source)
def fdel(self, instance): (source)
def fget(self, instance): (source)
def fset(self, instance, value): (source)
attr_name = (source)

Undocumented

datatype = (source)

Undocumented

Undocumented

Undocumented

onebased = (source)

Undocumented

def _fget_default(self, err=None): (source)

Undocumented

_NO_DEFAULT_ARGUMENT = (source)

Undocumented

Value
object()