SqlBuilder
Object Hierarchy:
Description:
Namespace: Gda
Package: libgda-5.0
Content:
Static methods:
- public static Quark error_quark ()
Creation methods:
- public SqlBuilder (SqlStatementType stmt_type)
Create a new SqlBuilder object to build Statement or SqlStatement objects of type
stmt_type
Methods:
- public SqlBuilderId add_case (SqlBuilderId test_expr, SqlBuilderId else_expr, ...)
Creates a new CASE ... WHEN ... THEN ... ELSE ... END expression.
- public SqlBuilderId add_case_v (SqlBuilderId test_expr, SqlBuilderId else_expr, SqlBuilderId[] when_array, SqlBuilderId[] then_array)
Creates a new CASE ... WHEN ... THEN ... ELSE ... END expression.
- public SqlBuilderId add_cond (SqlOperatorType op, SqlBuilderId op1, SqlBuilderId op2, SqlBuilderId op3)
Builds a new expression which represents a condition (or operation).
- public SqlBuilderId add_cond_v (SqlOperatorType op, SqlBuilderId[] op_ids)
Builds a new expression which represents a condition (or operation).
- public SqlBuilderId add_expr (DataHandler? dh, Type type, ...)
Defines an expression in this which may be reused to build other parts of a statement.
- public SqlBuilderId add_expr_value (DataHandler? dh, Value? value)
Defines an expression in this which may be reused to build other parts of a statement.
- public SqlBuilderId add_field_id (string field_name, string? table_name)
Defines an expression representing a field in this, which may be reused to build other parts of a statement, for instance as a parameter to add_cond or add_field_value_id.
- public void add_field_value (string field_name, Type type, ...)
Valid only for: INSERT, UPDATE statements.
- public void add_field_value_as_gvalue (string field_name, Value? value)
Valid only for: INSERT, UPDATE statements.
- public void add_field_value_id (SqlBuilderId field_id, SqlBuilderId value_id)
Valid only for: INSERT, UPDATE, SELECT statements
- public SqlBuilderId add_function (string func_name, ...)
Builds a new expression which represents a function applied to some arguments
- public SqlBuilderId add_function_v (string func_name, SqlBuilderId[] args)
Builds a new expression which represents a function applied to some arguments
- public SqlBuilderId add_id (string str)
Defines an expression representing an identifier in this, which may be reused to build other parts of a statement, for instance as a parameter to add_cond or add_field_value_id.
- public SqlBuilderId add_param (string param_name, Type type, bool nullok)
Defines a parameter in this which may be reused to build other parts of a statement.
- public void compound_add_sub_select_from_builder (SqlBuilder subselect)
Add a sub select to a COMPOUND statement
- public void compound_set_type (SqlStatementCompoundType compound_type)
Changes the type of compound which this is making, for a COMPOUND statement
- public Statement get_statement () throws Error
Creates a new Statement statement from this's contents.
- public SqlBuilderId import_expression_from_builder (SqlBuilder query, SqlBuilderId expr_id)
Imports the an expression located in
query
into this. - public void join_add_field (SqlBuilderId join_id, string field_name)
Alter a join in a SELECT statement to make its condition use equal field values in the fields named
field_name
in both tables, via the USING keyword. - public SqlBuilderId select_add_field (string field_name, string? table_name, string? alias)
Valid only for: SELECT statements.
- public SqlBuilderId select_add_target (string table_name, string? alias)
Adds a new target to a SELECT statement
- public SqlBuilderId select_add_target_id (SqlBuilderId table_id, string? alias)
Adds a new target to a SELECT statement.
- public void select_group_by (SqlBuilderId expr_id)
Valid only for: SELECT statements
- public void select_order_by (SqlBuilderId expr_id, bool asc, string? collation_name)
Adds a new ORDER BY expression to a SELECT statement.
- public void select_set_distinct (bool distinct, SqlBuilderId expr_id)
Defines (if
distinct
istrue
) or removes (ifdistinct
isfalse
) a DISTINCT clause for a SELECT statement. - public void select_set_having (SqlBuilderId cond_id)
Valid only for: SELECT statements
- public void select_set_limit (SqlBuilderId limit_count_expr_id, SqlBuilderId limit_offset_expr_id)
- public void set_table (string table_name)
Valid only for: INSERT, UPDATE, DELETE statements
- public void set_where (SqlBuilderId cond_id)
Valid only for: UPDATE, DELETE, SELECT statements
Inherited Members:
All known members inherited from class GLib.Object