GdaTable

Name

GdaTable -- An in-memory representation of a database table

Synopsis



struct      GdaTablePrivate;
GdaTable*   gda_table_new                   (const gchar *name);
GdaTable*   gda_table_new_from_model        (const gchar *name,
                                             const GdaDataModel *model,
                                             gboolean add_data);
const gchar* gda_table_get_name             (GdaTable *table);
void        gda_table_set_name              (GdaTable *table,
                                             const gchar *name);
void        gda_table_add_field             (GdaTable *table,
                                             const GdaFieldAttributes *fa);
void        gda_table_add_data_from_model   (GdaTable *table,
                                             const GdaDataModel *model);

Description

Details

struct GdaTablePrivate

struct GdaTablePrivate;


gda_table_new ()

GdaTable*   gda_table_new                   (const gchar *name);

Create a new GdaTable object, which is an in-memory representation of an entire table. It is mainly used by the GdaXmlDatabase class, but you can also use it in your applications for whatever you may need it.

name :

Name for the new table.

Returns :

the newly created object.


gda_table_new_from_model ()

GdaTable*   gda_table_new_from_model        (const gchar *name,
                                             const GdaDataModel *model,
                                             gboolean add_data);

Create a GdaTable object from the given GdaDataModel. This is very useful to maintain an in-memory copy of a given recordset obtained from a database. This is also used when exporting data to a GdaXmlDatabase object.

name :

Name for the new table.

model :

Model to create the table from.

add_data :

Whether to add model's data or not.

Returns :

the newly created object.


gda_table_get_name ()

const gchar* gda_table_get_name             (GdaTable *table);

Get the name of the given GdaTable.

table :

A GdaTable object.

Returns :

the name of the table.


gda_table_set_name ()

void        gda_table_set_name              (GdaTable *table,
                                             const gchar *name);

Set the name of the given GdaTable.

table :

A GdaTable object.

name :

New name for the table.


gda_table_add_field ()

void        gda_table_add_field             (GdaTable *table,
                                             const GdaFieldAttributes *fa);

Adds a field to the given GdaTable.

table :

A GdaTable object.

fa :

Attributes for the new field.


gda_table_add_data_from_model ()

void        gda_table_add_data_from_model   (GdaTable *table,
                                             const GdaDataModel *model);

table :

model :