GdaSqlExpr

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.

Members

Variables

GdaReserved1
void* GdaReserved1;
GdaReserved2
void* GdaReserved2;
GdaReserved3
void* GdaReserved3;
GdaReserved4
void* GdaReserved4;
any
GdaSqlAnyPart any;

inheritance structure

caseS
GdaSqlCase* caseS;

not null if expression is a CASE WHEN ... expression

castAs
char* castAs;

not null if expression must be cast to another data type

cond
GdaSqlOperation* cond;

not null if expression is a condition or an operation

func
GdaSqlFunction* func;

not null if expression is a function or aggregate

paramSpec
GdaSqlParamSpec* paramSpec;

a #GdaSqlParamSpec, or null if this is not a variable

select
GdaSqlAnyPart* select;

not null if expression is a sub select statement (#GdaSqlStatementSelect or #GdaSqlStatementCompound)

value
GValue* value;

a #GValue, or null. Please see specific note about this field.

valueIsIdent
bool valueIsIdent;

Please see specific note about the @value field