GLib.Tuples

Fields

Name

Type

Access

Description

len

int

r/w

the number of records that matched.

Methods

destroy ()

index (index_, field)

Details

class GLib.Tuples

The GLib.Tuples struct is used to return records (or tuples) from the GLib.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 GLib.Tuples.index().

Deprecated since version 2.26: Rarely used API

destroy()[source]

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 GLib.Relation.

Deprecated since version 2.26: Rarely used API

index(index_, field)[source]
Parameters:
  • index (int) – the index of the record.

  • field (int) – the field to return.

Returns:

the field of the record.

Return type:

object or None

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.

Deprecated since version 2.26: Rarely used API