## GdaServerOperation: sequences

GdaServerOperation: sequences — Manipulating sequences

## Stability Level

Stable, unless otherwise indicated

## Functions

const gchar * | gda_server_operation_get_sequence_name ()
guint | gda_server_operation_get_sequence_size ()
guint | gda_server_operation_get_sequence_max_size ()
guint | gda_server_operation_get_sequence_min_size ()
gchar ** | gda_server_operation_get_sequence_item_names ()
guint | gda_server_operation_add_item_to_sequence ()
gboolean | gda_server_operation_del_item_from_sequence ()

## Includes

    #include <virtual/gda-ldap-connection.h>

## Description

The GdaServerOperation object can contain sequences of templates. For example when creating a table, one can specify several foreign keys where for each foreign key, one must define the column(s) on which the foreign key applies, the referenced table and the corresponding columns of the referenced table (plus some additional information). In this case the foreign keys are defined as a sequence of templates (the foreign key definition): there can be zero or more foreign keys.

## Functions

### gda_server_operation_get_sequence_name ()

    const gchar *
    gda_server_operation_get_sequence_name
                                   (GdaServerOperation *op,
                                    const gchar *path);

#### Parameters

op | a GdaServerOperation object |
path | a complete path to a sequence node (starting with "/") |

#### Returns

the name of the sequence at `path` .

[transfer none]

### gda_server_operation_get_sequence_size ()

    guint
    gda_server_operation_get_sequence_size
                                   (GdaServerOperation *op,
                                    const gchar *path);

#### Parameters

op | a GdaServerOperation object |
path | a complete path to a sequence node (starting with "/") |

#### Returns

the number of items in the sequence at `path` , or 0 if `path` is not a sequence node

### gda_server_operation_get_sequence_max_size ()

    guint
    gda_server_operation_get_sequence_max_size
                                   (GdaServerOperation *op,
                                    const gchar *path);

#### Parameters

op | a GdaServerOperation object |
path | a complete path to a sequence node (starting with "/") |

#### Returns

the maximum number of items in the sequence at `path` , or 0 if `path` is not a sequence node

### gda_server_operation_get_sequence_min_size ()

    guint
    gda_server_operation_get_sequence_min_size
                                   (GdaServerOperation *op,
                                    const gchar *path);

#### Parameters

op | a GdaServerOperation object |
path | a complete path to a sequence node (starting with "/") |

#### Returns

the minimum number of items in the sequence at `path` , or 0 if `path` is not a sequence node

### gda_server_operation_get_sequence_item_names ()

    gchar **
    gda_server_operation_get_sequence_item_names
                                   (GdaServerOperation *op,
                                    const gchar *path);

Fetch the contents of a sequence. `path` can describe either a sequence (for example "/SEQNAME") or an item in a sequence (for example "/SEQNAME/3")

#### Parameters

op | a GdaServerOperation object |
path | a complete path to a sequence node (starting with "/") |

#### Returns

a array of strings containing the complete paths of the nodes contained at `path` (free with `g_strfreev()`).

[transfer full]

### gda_server_operation_add_item_to_sequence ()

    guint
    gda_server_operation_add_item_to_sequence
                                   (GdaServerOperation *op,
                                    const gchar *seq_path);

#### Parameters

op | a GdaServerOperation object |
seq_path | the path to the sequence to which an item must be added (like "/SEQ_NAME" for instance) |

#### Returns

the index of the new entry in the sequence (like 5 for example if a 6th item has been added to the sequence.

### gda_server_operation_del_item_from_sequence ()

    gboolean
    gda_server_operation_del_item_from_sequence
                                   (GdaServerOperation *op,
                                    const gchar *item_path);

#### Parameters

op | a GdaServerOperation object |
item_path | the path to the sequence's item to remove (like "/SEQ_NAME/5" for instance) |

#### Returns

TRUE if the specified node has been removed from the sequence

## Types and Values

## See Also

GdaServerOperation