Skip to content

GLib.Tuples

record (struct)

:::warning Deprecated since 2.26 This API is deprecated. :::

The Tuples struct is used to return records (or tuples) from the Relation by g_relation_select(). It only contains one public member - the number of records that matched. To access the matched records, you must use Tuples.index.

Methods

destroy

def destroy(self) -> None

:::warning Deprecated since 2.26 This API is deprecated. :::

Frees the records which were returned by g_relation_select(). This should always be called after g_relation_select() when you are finished with the records. The records are not removed from the Relation.

index

def index(self, index_: int, field: int) -> int | None

:::warning Deprecated since 2.26 This API is deprecated. :::

Gets a field from the records returned by g_relation_select(). It returns the given field of the record at the given index. The returned value should not be changed.

Parameters:

  • index_ — the index of the record.
  • field — the field to return.

Properties

len

len: int  # read/write