class documentation

class index_property(hybrid_property):

View In Hierarchy

A property generator. The generated property describes an object attribute that corresponds to an _types.Indexable column.

New in version 1.1.
Method __init__ Create a new .index_property.
Method ​_fget​_default Undocumented
Method expr Undocumented
Method fdel Undocumented
Method fget Undocumented
Method fset Undocumented
Constant ​_NO​_DEFAULT​_ARGUMENT Undocumented
Instance Variable attr​_name Undocumented
Instance Variable datatype Undocumented
Instance Variable default Undocumented
Instance Variable index Undocumented
Instance Variable onebased Undocumented

Inherited from hybrid_property:

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.
Method __delete__ Undocumented
Method __get__ Undocumented
Method __set__ Undocumented
Method ​_copy Undocumented
Method ​_get​_comparator Undocumented
Method ​_get​_expr 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 ​_expr​_comparator Undocumented
Property overrides Prefix for a method that is overriding an existing attribute.

Inherited from InspectionAttrInfo (via hybrid_property):

Property info Info dictionary associated with the object, allowing user-defined data to be associated with this .InspectionAttr.

Inherited from InspectionAttr (via hybrid_property, InspectionAttrInfo):

Class Variable __slots__ Undocumented
Class Variable ​_is​_internal​_proxy True if this object is an internal proxy object.
Class Variable is​_aliased​_class True if this object is an instance of .AliasedClass.
Class Variable is​_bundle True if this object is an instance of .Bundle.
Class Variable is​_clause​_element True if this object is an instance of _expression.ClauseElement.
Class Variable is​_instance True if this object is an instance of .InstanceState.
Class Variable is​_mapper True if this object is an instance of _orm.Mapper.
Class Variable is​_property True if this object is an instance of .MapperProperty.
Class Variable is​_selectable Return True if this object is an instance of _expression.Selectable.
def __init__(self, attr_name, index, default=_NO_DEFAULT_ARGUMENT, datatype=None, mutable=True, onebased=True):
Create a new .index_property.
Parameters
attr​_nameAn attribute name of an Indexable typed column, or other attribute that returns an indexable structure.
indexThe index to be used for getting and setting this value. This should be the Python-side index value for integers.
defaultA value which will be returned instead of AttributeError when there is not a value at given index.
datatypedefault 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.
mutableif False, writes and deletes to the attribute will be disallowed.
onebasedassume the SQL representation of this value is one-based; that is, the first index in SQL is 1, not zero.
def _fget_default(self, err=None):

Undocumented

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

Undocumented

Value
object()
attr_name =

Undocumented

datatype =

Undocumented

default =

Undocumented

index =

Undocumented

onebased =

Undocumented