5.2.18. xgt.RowID

class xgt.RowID(container_map: _ContainerMap, row_id_list: list[int])

RowID represents a row ID returned from a server. The user shouldn’t manually construct these.

Deprecated since version 2.7.0: RowID will be replaced by the element classes (TableRow, Vertex, Edge) as the representation of frame rows. Prefer retrieving row ID columns with Job.get_data() or TableFrame.get_data() using expand = 'light', which returns elements already carrying their properties, and the TableRow.element_id string for references that can be stored or passed back into queries (also available on this class as element_id, to ease migration). RowID keeps working and remains the default return type for row ID columns for now.

Parameters:
  • container_map (_ContainerMap) – Map of container ids to frames.

  • row_id_list (list[int]) – List in the form: [X, Y] where X is the row id and Y is the commit id when this value was valid.

Methods

get_data([include_row_labels])

Returns row data.

Attributes

element_id

The row's elementId() string, "{rowid}:{commit_id}" -- a stable, round-trippable reference to the row.

frame

The frame the RowID points into.

position

The row position the RowID points to.

property element_id: str

The row’s elementId() string, "{rowid}:{commit_id}" – a stable, round-trippable reference to the row. Pass it back into a query with WHERE elementId(v) = $idval, or store it as ordinary text. This is the same reference the element classes expose; see TableRow.element_id for the full semantics.

Added in version 2.7.0.

property frame: TableFrame | VertexFrame | EdgeFrame

The frame the RowID points into.

get_data(include_row_labels: bool = False) list[Any]

Returns row data. If the frame this row points to has had deletions since the RowID was created, this row is considered invalid and will raise an exception.

Parameters:

include_row_labels (bool) – Indicates whether the security labels for each row should be egested along with the row.

Returns:

The properties of the row.

Return type:

list[Any]

Raises:
  • XgtNameError – If the frame does not exist on the server.

  • XgtSecurityError – If the user does not have required permissions for this action.

  • XgtTransactionError – If a conflict with another transaction occurs.

  • XgtValueError – If parameter is out of bounds or the row is no longer valid due to a transactional update.

property position: int

The row position the RowID points to.