SqlStatement
Object Hierarchy:
Description:
[ CCode ( copy_function = "g_boxed_copy" , free_function = "g_boxed_free" , type_id = "gda_sql_statement_get_type ()" ) ]
[ Compact ]
public class SqlStatement
[ Compact ]
public class SqlStatement
This structure is the top level structure encapsulating several type of statements.
Namespace: Gda
Package: libgda-6.0
Content:
Static methods:
- public static SqlStatementContentsInfo get_contents_infos (SqlStatementType type)
- public static SqlStatementType string_to_type (string type)
- public static unowned string type_to_string (SqlStatementType type)
Creation methods:
- public SqlStatement (SqlStatementType type)
Use this function to create a SqlStatement of the specified
type
type.
Methods:
- public void check_clean ()
Cleans any data set by a previous call to check_validity.
- public bool check_structure () throws Error
Checks for any error in this's structure to make sure the statement is valid (for example a SELECT statement must at least return a column, a DELETE statement must specify which table is targeted).
- public bool check_validity (Connection? cnc) throws Error
If
cnc
is not null, then checks that all the database objects referenced in the statement actually exist in the connection's database (for example the table being updated in a UPDATE statement must exist in the connection's database for the check to succeed). - public bool check_validity_m (MetaStruct? mstruct) throws Error
If
mstruct
is not null, then checks that all the database objects referenced in the statement i actually referenced inmstruct
(for example the table being updated in a UPDATE statement must exist in the connection's database for the check to succeed). - public void compound_set_type (SqlStatementCompoundType type)
Specifies this's type of compound
- public void compound_take_stmt (SqlStatement s)
Adds the
s
sub-statement to the this compound statement. - public SqlStatement copy ()
Creates a copy of this.
- public void delete_take_condition (SqlExpr cond)
Sets the WHERE condition of this.
- public void delete_take_table_name (Value value)
Sets the name of the table to delete from in this .
- public void free ()
Releases any memory associated to this.
- public void insert_take_1_values_list (SList<SqlExpr> list)
Sets a list of values to be inserted by this .
- public void insert_take_extra_values_list (SList<SqlExpr> list)
Sets a list of list of values to be inserted by this.
- public void insert_take_fields_list (SList<SqlField> list)
Sets the list of fields for which values will be specified in this.
- public void insert_take_on_conflict (Value value)
Sets the name of the resolution conflict algorithm used by this.
- public void insert_take_select (SqlStatement select)
Specifies a SELECT statement, the values inserted will be the result set of
select
. - public void insert_take_table_name (Value value)
Sets the name of the table to insert into in this .
- public bool normalize (Connection? cnc) throws Error
"Normalizes" (in place) some parts of this , which means this may be modified.
- public void select_take_distinct (bool distinct, SqlExpr? distinct_expr)
Sets the DISTINCT clause of this.
- public void select_take_expr_list (SList<SqlSelectField> expr_list)
Sets list of expressions selected by this
- public void select_take_from (SqlSelectFrom from)
Sets the FROM clause of this
- public void select_take_group_by (SList<SqlExpr> group_by)
Sets the GROUP BY clause of this
- public void select_take_having_cond (SqlExpr expr)
Sets the HAVING clause of this
- public void select_take_limits (SqlExpr count, SqlExpr offset)
Sets the LIMIT clause of this
- public void select_take_order_by (SList<SqlSelectOrder> order_by)
Sets the ORDER BY clause of this
- public void select_take_where_cond (SqlExpr expr)
Sets the WHERE clause of this
- public string serialize ()
Creates a string representation of this.
- public void trans_set_isol_level (TransactionIsolation level)
- public void trans_take_mode (owned Value value)
Sets the model of the transaction
- public void trans_take_name (owned Value value)
Sets the name of the transaction
- public void unknown_take_expressions (SList<SqlExpr> expressions)
Sets this's list of expressions
- public void update_take_condition (SqlExpr cond)
Sets the WHERE clause of this
- public void update_take_on_conflict (Value value)
Sets the name of the resolution conflict algorithm used by this.
- public void update_take_set_value (Value fname, SqlExpr expr)
Specifies that the field named
fname
will be updated with the expressionexpr
. - public void update_take_table_name (Value value)
Sets the name of the table to delete from in this .
Fields:
- public void* contents
- public unowned string sql
- public SqlStatementType stmt_type
- public unowned MetaStruct validity_meta_struct