Top |
Functions
GQuark | gda_ddl_table_error_quark () |
GdaDdlTable * | gda_ddl_table_new () |
void | gda_ddl_table_free () |
gboolean | gda_ddl_table_is_valid () |
const GList * | gda_ddl_table_get_columns () |
const GList * | gda_ddl_table_get_fkeys () |
void | gda_ddl_table_append_column () |
gboolean | gda_ddl_table_is_temp () |
void | gda_ddl_table_set_temp () |
gboolean | gda_ddl_table_prepare_create () |
gboolean | gda_ddl_table_update () |
gboolean | gda_ddl_table_create () |
GdaDdlTable * | gda_ddl_table_new_from_meta () |
void | gda_ddl_table_append_fkey () |
Types and Values
#define | GDA_TYPE_DDL_TABLE |
struct | GdaDdlTableClass |
enum | GdaDdlTableError |
#define | GDA_DDL_TABLE_ERROR |
GdaDdlTable |
Description
This object represents a table of a database. The table view can be constracted manually using API or generated from xml file together with other databse objects. See GdaDdlCreator. GdaDdlTable implements GdaDdlBuildable interface for parsing xml file.
Functions
gda_ddl_table_new ()
GdaDdlTable *
gda_ddl_table_new (void
);
Returns
New instance of GdaDdlTable. Use gda_ddl_table_free()
to delete the object and free
the memory.
gda_ddl_table_free ()
void
gda_ddl_table_free (GdaDdlTable *self
);
A convenient method to free free the object
Since: 6.0
gda_ddl_table_get_columns ()
const GList *
gda_ddl_table_get_columns (GdaDdlTable *self
);
Use this method to obtain internal list of all columns. The internal list should not be freed.
Returns
A list of GdaDdlColumn objects or NULL
if the internal list is
not set or if NULL
is passed.
[element-type Gda.DdlColumn][transfer none]
Since: 6.0
gda_ddl_table_get_fkeys ()
const GList *
gda_ddl_table_get_fkeys (GdaDdlTable *self
);
Use this method to obtain internal list of all fkeys. The internal list should not be freed.
Returns
A list of GdaDdlFkey objects or NULL
if the internal list is not
set or NULL
is passed.
[element-type Gda.DdlFkey]
Since: 6.0
gda_ddl_table_append_column ()
void gda_ddl_table_append_column (GdaDdlTable *self
,GdaDdlColumn *column
);
Append column
to the internal list of columns
Since: 6.0
gda_ddl_table_is_temp ()
gboolean
gda_ddl_table_is_temp (GdaDdlTable *self
);
Checks if the table is temporary
Since: 6.0
gda_ddl_table_set_temp ()
void gda_ddl_table_set_temp (GdaDdlTable *self
,gboolean istemp
);
Set if the table should be temporary or not. False is set by default.
Since: 6.0
gda_ddl_table_prepare_create ()
gboolean gda_ddl_table_prepare_create (GdaDdlTable *self
,GdaServerOperation *op
,GError **error
);
Populate op
with information stored in self
. This method sets op
to execute CREATE_TABLE
operation.
Parameters
self |
a GdaDdlTable instance |
|
op |
an instance of GdaServerOperation to populate. |
|
error |
error container |
Since: 6.0
gda_ddl_table_update ()
gboolean gda_ddl_table_update (GdaDdlTable *self
,GdaMetaTable *obj
,GdaConnection *cnc
,GError **error
);
With this method object obj
in the database available through cnc
will be updated using
ADD_COLUMN operation with information stored in self
.
Parameters
self |
a GdaDdlTable instance |
|
obj |
The corresponding meta object to take data from |
|
cnc |
opened connection |
|
error |
error container |
gda_ddl_table_create ()
gboolean gda_ddl_table_create (GdaDdlTable *self
,GdaConnection *cnc
,GError **error
);
Execute a full set of steps to create tabe in the database. This method is called with "IFNOTEXISTS" option.
Since: 6.0
gda_ddl_table_new_from_meta ()
GdaDdlTable *
gda_ddl_table_new_from_meta (GdaMetaDbObject *obj
);
Create new GdaDdlTable instance from the corresponding GdaMetaDbObject
object. If NULL
is passed this function works exactly as
gda_ddl_table_new()
Since: 6.0
gda_ddl_table_append_fkey ()
void gda_ddl_table_append_fkey (GdaDdlTable *self
,GdaDdlFkey *fkey
);
Append fkey
to the internal list of columns
Since: 6.0