| Top |
void gda_sql_statement_insert_take_table_name (GdaSqlStatement *stmt,GValue *value);
Sets the name of the table to insert into in stmt
. value
's ownership is transferred to
stmt
(which means stmt
is then responsible for freeing it when no longer needed).
stmt |
a GdaSqlStatement pointer |
|
value |
name of the table to insert into, as a G_TYPE_STRING GValue |
void gda_sql_statement_insert_take_on_conflict (GdaSqlStatement *stmt,GValue *value);
Sets the name of the resolution conflict algorithm used by stmt
. value
's ownership is transferred to
stmt
(which means stmt
is then responsible for freeing it when no longer needed).
stmt |
a GdaSqlStatement pointer |
|
value |
name of the resolution conflict algorithm, as a G_TYPE_STRING GValue |
void gda_sql_statement_insert_take_fields_list (GdaSqlStatement *stmt,GSList *list);
Sets the list of fields for which values will be specified in stmt
. list
's
ownership is transferred to
stmt
(which means stmt
is then responsible for freeing it when no longer needed).
stmt |
a GdaSqlStatement pointer |
|
list |
a list of GdaSqlField pointers. |
[element-type Gda.SqlField] |
void gda_sql_statement_insert_take_1_values_list (GdaSqlStatement *stmt,GSList *list);
Sets a list of values to be inserted by stmt
. list
's
ownership is transferred to
stmt
(which means stmt
is then responsible for freeing it when no longer needed).
stmt |
a GdaSqlStatement pointer |
|
list |
a list of GdaSqlExpr pointers. |
[element-type Gda.SqlExpr] |
void gda_sql_statement_insert_take_extra_values_list (GdaSqlStatement *stmt,GSList *list);
Sets a list of list of values to be inserted by stmt
. list
's
ownership is transferred to
stmt
(which means stmt
is then responsible for freeing it when no longer needed).
stmt |
a GdaSqlStatement pointer |
|
list |
a list of GSList of GdaSqlExpr pointers. |
[element-type GdaSqlExpr] |
void gda_sql_statement_insert_take_select (GdaSqlStatement *stmt,GdaSqlStatement *select);
Specifies a SELECT statement, the values inserted will be the result set of select
. select
's
ownership is transferred to
stmt
(which means stmt
is then responsible for freeing it when no longer needed).
typedef struct {
GdaSqlAnyPart any;
gchar *on_conflict; /* conflict resolution clause */
GdaSqlTable *table;
GSList *fields_list; /* list of GdaSqlField structures */
GSList *values_list; /* list of list of GdaSqlExpr */
GdaSqlAnyPart *select; /* SELECT OR COMPOUND statements: GdaSqlStatementSelect or GdaSqlStatementCompound */
} GdaSqlStatementInsert;
The statement is an INSERT statement, any kind of INSERT statement can be represented using this structure (if this is not the case then report a bug).

Example of a GdaSqlStatement having a GdaSqlStatementInsert as its contents with 2 lists of values to insert.

Another example of a GdaSqlStatement having a GdaSqlStatementInsert as its contents, using a SELECT to express the values to insert.