:right-sidebar: True Tuples =================================================================== .. currentmodule:: gi.repository.GLib .. deprecated:: 2.26 Rarely used API .. class:: Tuples(*args, **kwargs) :no-contents-entry: The :obj:`~gi.repository.GLib.Tuples` struct is used to return records (or tuples) from the :obj:`~gi.repository.GLib.Relation` by :func:`~gi.repository.GLib.Relation.select`. It only contains one public member - the number of records that matched. To access the matched records, you must use :func:`~gi.repository.GLib.Tuples.index`. Methods ------- .. rst-class:: interim-class .. class:: Tuples :no-index: .. method:: destroy() -> None Frees the records which were returned by :func:`~gi.repository.GLib.Relation.select`. This should always be called after :func:`~gi.repository.GLib.Relation.select` when you are finished with the records. The records are not removed from the :obj:`~gi.repository.GLib.Relation`\. .. deprecated:: 2.26 Rarely used API .. method:: index(index_: int, field: int) -> ~typing.Any | None Gets a field from the records returned by :func:`~gi.repository.GLib.Relation.select`. It returns the given field of the record at the given index. The returned value should not be changed. .. deprecated:: 2.26 Rarely used API :param index_: the index of the record. :param field: the field to return. Fields ------ .. rst-class:: interim-class .. class:: Tuples :no-index: .. attribute:: len The number of records that matched.