Top | ![]() |
![]() |
![]() |
![]() |
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 () |
#define | GDA_TYPE_DDL_TABLE |
struct | GdaDdlTableClass |
enum | GdaDdlTableError |
#define | GDA_DDL_TABLE_ERROR |
GdaDdlTable |
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.
GdaDdlTable *
gda_ddl_table_new (void
);
New instance of GdaDdlTable. Use gda_ddl_table_free()
to delete the object and free
the memory.
void
gda_ddl_table_free (GdaDdlTable *self
);
A convenient method to free free the object
Since: 6.0
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.
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
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.
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
void gda_ddl_table_append_column (GdaDdlTable *self
,GdaDdlColumn *column
);
Append column
to the internal list of columns
Since: 6.0
gboolean
gda_ddl_table_is_temp (GdaDdlTable *self
);
Checks if the table is temporary
Since: 6.0
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
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.
self |
a GdaDdlTable instance |
|
op |
an instance of GdaServerOperation to populate. |
|
error |
error container |
Since: 6.0
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
.
self |
a GdaDdlTable instance |
|
obj |
The corresponding meta object to take data from |
|
cnc |
opened connection |
|
error |
error container |
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
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
void gda_ddl_table_append_fkey (GdaDdlTable *self
,GdaDdlFkey *fkey
);
Append fkey
to the internal list of columns
Since: 6.0