Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
GI.GLib.Structs.Tuples
Description
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 tuplesIndex
.
Synopsis
- newtype Tuples = Tuples (ManagedPtr Tuples)
- newZeroTuples :: MonadIO m => m Tuples
- tuplesDestroy :: (HasCallStack, MonadIO m) => Tuples -> m ()
- tuplesIndex :: (HasCallStack, MonadIO m) => Tuples -> Int32 -> Int32 -> m (Ptr ())
- getTuplesLen :: MonadIO m => Tuples -> m Word32
- setTuplesLen :: MonadIO m => Tuples -> Word32 -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq Tuples Source # | |
BoxedPtr Tuples Source # | |
Defined in GI.GLib.Structs.Tuples | |
CallocPtr Tuples Source # | |
Defined in GI.GLib.Structs.Tuples Methods boxedPtrCalloc :: IO (Ptr Tuples) | |
ManagedPtrNewtype Tuples Source # | |
Defined in GI.GLib.Structs.Tuples Methods toManagedPtr :: Tuples -> ManagedPtr Tuples | |
tag ~ 'AttrSet => Constructible Tuples tag Source # | |
Methods
Click to display all available methods, including inherited ones
destroy
Arguments
:: (HasCallStack, MonadIO m) | |
=> Tuples |
|
-> m () |
Deprecated: (Since version 2.26)Rarely used API
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
Arguments
:: (HasCallStack, MonadIO m) | |
=> Tuples |
|
-> Int32 |
|
-> Int32 |
|
-> m (Ptr ()) | Returns: the field of the record. |
Deprecated: (Since version 2.26)Rarely used API
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.
Properties
len
the number of records that matched.
getTuplesLen :: MonadIO m => Tuples -> m Word32 Source #
Get the value of the “len
” field.
When overloading is enabled, this is equivalent to
get
tuples #len
setTuplesLen :: MonadIO m => Tuples -> Word32 -> m () Source #
Set the value of the “len
” field.
When overloading is enabled, this is equivalent to
set
tuples [ #len:=
value ]