gda.sql_statement

Module for [SqlStatement] class

Types 1

This structure is the top level structure encapsulating several type of statements.

Methods
void * _cPtr(Flag!"Dup" dup = No.Dup)
GType _gType() @property
SqlStatement self()Returns `this`, for use in `with` statements.
string sql() @property
void sql(string propval) @property
gda.types.SqlStatementType stmtType() @propertyGet `stmtType` field. Returns: type of statement
void stmtType(gda.types.SqlStatementType propval) @propertySet `stmtType` field. Params: propval = type of statement
void checkClean()Cleans any data set by a previous call to [gda.sql_statement.SqlStatement.checkValidity].
bool checkStructure()Checks for any error in stmt'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)....
bool checkValidity(gda.connection.Connection cnc = null)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...
bool checkValidityM(gda.meta_struct.MetaStruct mstruct = null)If mstruct is not null, then checks that all the database objects referenced in the statement i actually referenced in mstruct (for example the table being updated in a UPDATE statement must exist ...
void compoundSetType(gda.types.SqlStatementCompoundType type)Specifies stmt's type of compound
void compoundTakeStmt(gda.sql_statement.SqlStatement s)Adds the `s` sub-statement to the `s`tmt compound statement. `s`'s reference is transferred to `s`tmt (which means `s`tmt is then responsible for freeing it when no longer needed).
gda.sql_statement.SqlStatement copy()Creates a copy of stmt. Returns: a new #GdaSqlStatement
void deleteTakeTableName(gobject.value.Value value)Sets the name of the table to delete from in stmt. value's ownership is transferred to stmt (which means stmt is then responsible for freeing it when no longer needed).
void insertTakeOnConflict(gobject.value.Value 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).
void insertTakeSelect(gda.sql_statement.SqlStatement 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 nee...
void insertTakeTableName(gobject.value.Value 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).
bool normalize(gda.connection.Connection cnc = null)"Normalizes" (in place) some parts of stmt, which means stmt may be modified. At the moment any "*" field in a SELECT statement will be replaced by one #GdaSqlSelectField structure for each field i...
string serialize()Creates a string representation of stmt. Returns: a new string
void transTakeMode(gobject.value.Value value)Sets the model of the transaction
void transTakeName(gobject.value.Value value)Sets the name of the transaction
void updateTakeOnConflict(gobject.value.Value 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).
void updateTakeTableName(gobject.value.Value value)Sets the name of the table to delete from in stmt.
gda.types.SqlStatementType stringToType(string type)Converts a string to a #GdaSqlStatementType value, see also [gda.sql_statement.SqlStatement.typeToString]
string typeToString(gda.types.SqlStatementType type)Converts a #GdaSqlStatementType to a string, see also [gda.sql_statement.SqlStatement.stringToType]
Constructors
this(void * ptr, Flag!"Take" take)
this(gda.types.SqlStatementType type)Use this function to create a #GdaSqlStatement of the specified type type.