gda.sql_expr
Module for [SqlExpr] class
Types 1
This structure contains any expression, either as a value (the @value part is set), a variable (the @param_spec is set), or as other types of expressions.
Note 1 about the @value field: if the expression represents a string value in the SQL statement, the string itself must be represented as it would be in the actual SQL, ie. it should be escaped (accordingly to the escaping rules of the database which will use the SQL). For example a string representing the <userinput>'joe'</userinput> value should be
<userinput>"'joe'"</userinput> and not <userinput>"joe"</userinput>.Note 2 about the @value field: if the expression represents an SQL identifier (such as a table or field name), then the @value_is_ident should be set to true, and @value should be a string which may contain double quotes around SQL identifiers which also are reserved keywords or which are case sensitive.
gobject.value.Value value() @propertyGet `value` field. Returns: a #GValue, or null. Please see specific note about this field.void value(gobject.value.Value propval) @propertySet `value` field. Params: propval = a #GValue, or null. Please see specific note about this field.gda.sql_param_spec.SqlParamSpec paramSpec() @propertyGet `paramSpec` field. Returns: a #GdaSqlParamSpec, or null if this is not a variablegda.sql_function.SqlFunction func() @propertyGet `func` field. Returns: not null if expression is a function or aggregategda.sql_operation.SqlOperation cond() @propertyGet `cond` field. Returns: not null if expression is a condition or an operationgda.sql_case.SqlCase caseS() @propertyGet `caseS` field. Returns: not null if expression is a CASE WHEN ... expressionstring castAs() @propertyGet `castAs` field. Returns: not null if expression must be cast to another data typevoid castAs(string propval) @propertySet `castAs` field. Params: propval = not null if expression must be cast to another data typebool valueIsIdent() @propertyGet `valueIsIdent` field. Returns: Please see specific note about the @value fieldvoid valueIsIdent(bool propval) @propertySet `valueIsIdent` field. Params: propval = Please see specific note about the @value fieldstring serialize()Creates a new string representation of the SQL expression. You need to free the returned string using [glib.global.gfree]; Returns: a new string with the SQL expression or "null" in case expr is in...void takeSelect(gda.sql_statement.SqlStatement stmt)Sets the expression's parent to the #GdaSqlStatementSelect held by stmt. After calling this function stmt is freed.