A subclass of .Row
that delivers 1.x SQLAlchemy behaviors
for Core.
The .LegacyRow
class is where most of the Python mapping
(i.e. dictionary-like)
behaviors are implemented for the row object. The mapping behavior
of .Row
going forward is accessible via the .Row._mapping
attribute.
.LegacyRow
which encapsulates most
of the deprecated behaviors of .Row
.Method | __contains__ |
Undocumented |
Method | has_key |
Return True if this .LegacyRow contains the given key. |
Method | items |
Return a list of tuples, each tuple containing a key/value pair. |
Method | iterkeys |
Return a an iterator against the .Row.keys method. |
Method | itervalues |
Return a an iterator against the .Row.values method. |
Method | values |
Return the values represented by this .Row as a list. |
Class Variable | __slots__ |
Undocumented |
Inherited from Row
:
Method | __delattr__ |
Undocumented |
Method | __eq__ |
Undocumented |
Method | __ge__ |
Undocumented |
Method | __getstate__ |
Undocumented |
Method | __gt__ |
Undocumented |
Method | __le__ |
Undocumented |
Method | __lt__ |
Undocumented |
Method | __ne__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | __setattr__ |
Undocumented |
Method | __setstate__ |
Undocumented |
Method | _asdict |
Return a new dict which maps field names to their corresponding values. |
Method | _op |
Undocumented |
Method | _replace |
Undocumented |
Method | _special_name_accessor |
Handle ambiguous names such as "count" and "index" |
Method | keys |
Return the list of keys as strings represented by this .Row . |
Class Variable | count |
Undocumented |
Class Variable | index |
Undocumented |
Property | _field_defaults |
Undocumented |
Property | _fields |
Return a tuple of string keys as represented by this .Row . |
Property | _mapping |
Return a .RowMapping for this .Row . |
Inherited from BaseRow
(via Row
):
Method | __getattr__ |
Undocumented |
Method | __hash__ |
Undocumented |
Method | __init__ |
Row objects are constructed by CursorResult objects. |
Method | __iter__ |
Undocumented |
Method | __len__ |
Undocumented |
Method | __reduce__ |
Undocumented |
Method | _filter_on_values |
Undocumented |
Method | _get_by_int_impl |
Undocumented |
Method | _get_by_key_impl |
Undocumented |
Method | _get_by_key_impl_mapping |
Undocumented |
Method | _values_impl |
Undocumented |
Return True if this .LegacyRow
contains the given key.
Through the SQLAlchemy 1.x series, the __contains__() method of
.Row
(or .LegacyRow
as of SQLAlchemy 1.4) also links
to .Row.has_key
, in that an expression such as
"some_col" in row
Will return True if the row contains a column named "some_col", in the way that a Python mapping works.
However, it is planned that the 2.0 series of SQLAlchemy will reverse this behavior so that __contains__() will refer to a value being present in the row, in the way that a Python tuple works.
See Also
Return a list of tuples, each tuple containing a key/value pair.
This method is analogous to the Python dictionary .items() method, except that it returns a list, not an iterator.
Return a an iterator against the .Row.keys
method.
This method is analogous to the Python-2-only dictionary .iterkeys() method.
Return a an iterator against the .Row.values
method.
This method is analogous to the Python-2-only dictionary .itervalues() method.
Return the values represented by this .Row
as a list.
This method is analogous to the Python dictionary .values() method, except that it returns a list, not an iterator.