Gjsify LogoGjsify Logo

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 'joe' value should be "'joe'" and not "joe".

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.

record

Hierarchy

  • SqlExpr

Index

Constructors

  • Creates a new #GdaSqlField structure, using parent as its parent part.

    Parameters

    • parent: Gda.SqlAnyPart

      a #GdaSqlStatementInsert, #GdaSqlStatementUpdate, #GdaSqlSelectField, #GdaSqlSelectTarget, #GdaSqlOperation

    Returns Gda.SqlExpr

Properties

inheritance structure

field
case_s: Gda.SqlCase

not %NULL if expression is a CASE WHEN ... expression

field
cast_as: string

not %NULL if expression must be cast to another data type

field

not %NULL if expression is a condition or an operation

field

not %NULL if expression is a function or aggregate

field
param_spec: SqlParamSpec

a #GdaSqlParamSpec, or %NULL if this is not a variable

field
select: Gda.SqlAnyPart

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

field
value: any

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

field
value_is_ident: boolean

Please see specific note about the value field

field
name: string

Methods

  • free(): void
  • serialize(): string
  • Creates a new string representation of the SQL expression. You need to free the returned string using g_free();

    Returns string

  • Sets the expression's parent to the #GdaSqlStatementSelect held by stmt. After calling this function stmt is freed.

    Parameters

    • stmt: Gda.SqlStatement

      a #GdaSqlStatement holding the #GdaSqlStatementSelect to take from

    Returns void

  • Creates a new #GdaSqlField structure, using parent as its parent part.

    Parameters

    • parent: Gda.SqlAnyPart

      a #GdaSqlStatementInsert, #GdaSqlStatementUpdate, #GdaSqlSelectField, #GdaSqlSelectTarget, #GdaSqlOperation

    Returns Gda.SqlExpr

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method