SqlBuilder
Object Hierarchy:
Gda.SqlBuilder
Gda.SqlBuilder
Gda.SqlBuilder
GLib.Object
GLib.Object
GLib.Object->Gda.SqlBuilder
Description:
[ CCode ( type_id = "gda_sql_builder_get_type ()" ) ]public class SqlBuilder : Object
Content:
Static methods:
Creation methods:
Methods:
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_value (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 = null )
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_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 <itemizedlist>
<listitem><para>For UPDATE: specifies that the field represented by field_id
will be set to the value
identified by value_id
.
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 SqlBuilderId add_sub_select (SqlStatement sqlst)
Adds an expression which is a subselect.
public void compound_add_sub_select (SqlStatement sqlst)
Add a sub select to a COMPOUND 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 SqlExpr export_expression (SqlBuilderId id)
Exports a part managed by this as a
new SqlExpr , which can represent any expression in a statement.
public unowned SqlStatement ? get_sql_statement ()
public Statement get_statement () throws Error
Creates a new Statement
statement from this 's contents.
public SqlBuilderId import_expression (SqlExpr expr)
Imports the expr
into this
.
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 = null , string ? alias = null )
Valid only for: SELECT statements.
public SqlBuilderId select_add_target (string table_name, string ? alias = null )
Adds a new target to a SELECT statement
public SqlBuilderId select_add_target_id (SqlBuilderId table_id, string ? alias = null )
Adds a new target to a SELECT statement.
public void select_group_by (SqlBuilderId expr_id)
Valid only for: SELECT statements
public SqlBuilderId select_join_targets (SqlBuilderId left_target_id, SqlBuilderId right_target_id, SqlSelectJoinType join_type, SqlBuilderId join_expr)
Joins two targets in a SELECT statement, using the join_type
type of join.
public void select_order_by (SqlBuilderId expr_id, bool asc, string ? collation_name = null )
Adds a new ORDER BY expression to a SELECT statement.
public void select_set_distinct (bool distinct, SqlBuilderId expr_id)
Defines (if distinct
is true
) or removes (if distinct
is false ) 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)
If limit_count_expr_id
is not
0 , defines the maximum number of rows in the DataModel resulting from the
execution of the built statement.
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
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref