Public Member Functions | |
| __init__ (self, list[str] columns, list[tuple] rows) | |
| None | set_column_types (self, dict[str, felis.datamodel.DataType] types) |
| Sequence[str] | column_names (self) |
| Sequence[tuple[str, felis.datamodel.DataType]] | column_defs (self) |
| Collection[tuple] | rows (self) |
| None | append (self, ApdbCassandraTableData other) |
| None | project (self, *, Iterable[str] drop=set()) |
| Iterator[tuple] | __iter__ (self) |
Protected Attributes | |
| _columns = columns | |
| Collection[tuple] | _rows = rows |
| dict | _column_types = {} |
Implementation of ApdbTableData that wraps Cassandra raw data.
| Iterator[tuple] lsst.dax.apdb.cassandra.cassandra_utils.ApdbCassandraTableData.__iter__ | ( | self | ) |
Make it look like a row iterator, needed for some odd logic.
| None lsst.dax.apdb.cassandra.cassandra_utils.ApdbCassandraTableData.append | ( | self, | |
| ApdbCassandraTableData | other ) |
Extend rows in this table with rows in other table
| Sequence[tuple[str, felis.datamodel.DataType]] lsst.dax.apdb.cassandra.cassandra_utils.ApdbCassandraTableData.column_defs | ( | self | ) |
Return ordered sequence of column names and their types.
Returns
-------
columns : `~collections.abc.Sequence` \
[`tuple`[`str`, `felis.datamodel.DataType`]]
Sequence of 2-tuples, each tuple consists of column name and its
type.
Reimplemented from lsst.dax.apdb.apdbReplica.ApdbTableData.
| Sequence[str] lsst.dax.apdb.cassandra.cassandra_utils.ApdbCassandraTableData.column_names | ( | self | ) |
Return ordered sequence of column names in the table.
Returns
-------
names : `~collections.abc.Sequence` [`str`]
Column names.
Reimplemented from lsst.dax.apdb.apdbReplica.ApdbTableData.
| None lsst.dax.apdb.cassandra.cassandra_utils.ApdbCassandraTableData.project | ( | self, | |
| * | , | ||
| Iterable[str] | drop = set() ) |
Modify data in place by droppiing some columns.
| Collection[tuple] lsst.dax.apdb.cassandra.cassandra_utils.ApdbCassandraTableData.rows | ( | self | ) |
Return table rows, each row is a tuple of values.
Returns
-------
rows : `~collections.abc.Collection` [`tuple`]
Collection of tuples.
Reimplemented from lsst.dax.apdb.apdbReplica.ApdbTableData.
| None lsst.dax.apdb.cassandra.cassandra_utils.ApdbCassandraTableData.set_column_types | ( | self, | |
| dict[str, felis.datamodel.DataType] | types ) |
Update column types.
Parameters
----------
types : `dict`[`str`, `felis.datamodel.DataType`]
Mapping of column name its type.
Notes
-----
Due to the way how instances of this class are constructed it is
impossible to pass types of columns to the constructor, instead we will
need to make a call to this method after construction.