gi-glib-2.0.29: GLib bindings

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

Contents

- Exported types
- Methods
  - destroy
  - index
- Properties
  - len

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

newtype Tuples Source #

Memory-managed wrapper type.

Constructors

Tuples (ManagedPtr Tuples) |

#### Instances

Instances details

Eq Tuples Source # |
Instance details Defined in GI.GLib.Structs.Tuples Methods (==) :: Tuples -> Tuples -> Bool Source # (/=) :: Tuples -> Tuples -> Bool Source #
BoxedPtr Tuples Source # |
Instance details Defined in GI.GLib.Structs.Tuples Methods boxedPtrCopy :: Tuples -> IO Tuples Source # boxedPtrFree :: Tuples -> IO () Source #
CallocPtr Tuples Source # |
Instance details Defined in GI.GLib.Structs.Tuples Methods boxedPtrCalloc :: IO (Ptr Tuples) Source #
ManagedPtrNewtype Tuples Source # |
Instance details Defined in GI.GLib.Structs.Tuples Methods toManagedPtr :: Tuples -> ManagedPtr Tuples Source #
tag ~ 'AttrSet => Constructible Tuples tag Source # |
Instance details Defined in GI.GLib.Structs.Tuples Methods new :: MonadIO m => (ManagedPtr Tuples -> Tuples) -> [AttrOp Tuples tag] -> m Tuples Source #

newZeroTuples :: MonadIO m => m Tuples Source #

Construct a `Tuples` struct initialized to zero.

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

destroy, index.

#### Getters

None.

#### Setters

None.

## destroy

tuplesDestroy Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Tuples | `tuples`: the tuple data to free.
-> 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

tuplesIndex Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Tuples | `tuples`: the tuple data, returned by `g_relation_select()`.
-> Int32 | `index_`: the index of the record.
-> Int32 | `field`: the field to return.
-> 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 ]