class documentation

A ``Mapping`` that maps column names and objects to :class:`.Row` values. The :class:`.RowMapping` is available from a :class:`.Row` via the :attr:`.Row._mapping` attribute, as well as from the iterable interface provided by the :class:`.MappingResult` object returned by the :meth:`_engine.Result.mappings` method. :class:`.RowMapping` supplies Python mapping (i.e. dictionary) access to the contents of the row. This includes support for testing of containment of specific keys (string column names or objects), as well as iteration of keys, values, and items:: for row in result: if 'a' in row._mapping: print("Column 'a': %s" % row._mapping['a']) print("Column b: %s" % row._mapping[table.c.b]) .. versionadded:: 1.4 The :class:`.RowMapping` object replaces the mapping-like access previously provided by a database result row, which now seeks to behave mostly like a named tuple.

Method __contains__ Undocumented
Method __getitem__ Undocumented
Method __iter__ Undocumented
Method __len__ Undocumented
Method __repr__ Undocumented
Method items Return a view of key/value tuples for the elements in the underlying :class:`.Row`.
Method keys Return a view of 'keys' for string column names represented by the underlying :class:`.Row`.
Method values Return a view of values for the values represented in the underlying :class:`.Row`.
Class Variable __slots__ Undocumented
Method _values_impl Undocumented

Inherited from BaseRow:

Method __getattr__ Undocumented
Method __getstate__ Undocumented
Method __hash__ Undocumented
Method __init__ Row objects are constructed by CursorResult objects.
Method __reduce__ Undocumented
Method __setstate__ Undocumented
Method _get_by_int_impl Undocumented
Method _get_by_key_impl_mapping Undocumented
Class Variable _data Undocumented
Class Variable _key_style Undocumented
Class Variable _keymap Undocumented
Class Variable _parent Undocumented
def __contains__(self, key: object) -> bool: (source)

Undocumented

def __getitem__(self, key: _KeyType) -> Any: (source)

Undocumented

def __iter__(self) -> Iterator[str]: (source)
def __len__(self) -> int: (source)
def __repr__(self) -> str: (source)

Undocumented

Return a view of key/value tuples for the elements in the underlying :class:`.Row`.

def keys(self) -> RMKeyView: (source)

Return a view of 'keys' for string column names represented by the underlying :class:`.Row`.

Return a view of values for the values represented in the underlying :class:`.Row`.

def _values_impl(self) -> List[Any]: (source)