SQLAlchemy 0.4 Documentation - module sqlalchemy.orm.properties

# SQLAlchemy 0.4 Documentation

Multiple Pages | One Page
Version: 0.4.3 Last Updated: 02/14/08 18:54:07

### module sqlalchemy.orm.properties

MapperProperty implementations.

This is a private module which defines the behavior of invidual ORM-mapped attributes.

### class BackRef(object)

Attached to a PropertyLoader to indicate a complementary reverse relationship.

Can optionally create the complementing PropertyLoader if one does not exist already.

def __init__(self, key, _prop=None, **kwargs)

Construct a new `BackRef`.

def compile(self, prop)
def get_extension(self)

Return an attribute extension to use with this backreference.

back to section top

### class ColumnProperty(StrategizedProperty)

Describes an object attribute that corresponds to a table column.

def __init__(self, *columns, **kwargs)

The list of columns describes a single object property. If there are multiple tables joined together for the mapper, this list represents the equivalent column as it appears across each table.

def copy(self)
def create_strategy(self)
def do_init(self)
def get_col_value(self, column, value)
def getattr(self, state, column)
def getcommitted(self, state, column)
def merge(self, session, source, dest, dont_load, _recursive)
def setattr(self, state, value, column)
back to section top

### class CompositeProperty(ColumnProperty)

subclasses ColumnProperty to provide composite type support.

def __init__(self, class_, *columns, **kwargs)

Construct a new `CompositeProperty`.

def copy(self)
def do_init(self)
def get_col_value(self, column, value)
def getattr(self, state, column)
def getcommitted(self, state, column)
def setattr(self, state, value, column)
back to section top

### class PropertyLoader(StrategizedProperty)

Describes an object property that holds a single item or list of items that correspond to a related database table.

def __init__(self, argument, secondary=None, primaryjoin=None, secondaryjoin=None, entity_name=None, foreign_keys=None, foreignkey=None, uselist=None, private=False, association=None, order_by=False, attributeext=None, backref=None, is_backref=False, post_update=False, cascade=None, viewonly=False, lazy=True, collection_class=None, passive_deletes=False, passive_updates=True, remote_side=None, enable_typechecks=True, join_depth=None, strategy_class=None)

Construct a new `PropertyLoader`.

def cascade_iterator(self, type, state, recursive, halt_on=None)
def compare(self, op, value, value_is_parent=False)
def create_strategy(self)
def do_init(self)
def full_join_against(self, mapper, selectable=None)
def get_join(self, parent, primary=True, secondary=True, polymorphic_parent=True)

deprecated. use primary_join_against(), secondary_join_against(), full_join_against()

def merge(self, session, source, dest, dont_load, _recursive)
def primary_join_against(self, mapper, selectable=None)
private = property()
def register_dependencies(self, uowcommit)
def secondary_join_against(self, mapper)
back to section top

### class SynonymProperty(MapperProperty)

def __init__(self, name, map_column=None)

Construct a new `SynonymProperty`.

def create_row_processor(self, selectcontext, mapper, row)
def do_init(self)
def merge(self, session, source, dest, _recursive)
def setup(self, querycontext, **kwargs)
back to section top