SqlBuilder.addFieldValueId

void addFieldValueId(gda.types.SqlBuilderId fieldId, gda.types.SqlBuilderId valueId)

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.</para></listitem>

<listitem><para>For SELECT: add a selected item to the statement, and if value_id is not 0, then use it as an

alias</para></listitem>

<listitem><para>For INSERT: if field_id represents an SQL identifier (obtained using [gda.sql_builder.SqlBuilder.addId]): then if

value_id is not 0 then specifies that the field represented by field_id will be set to the value identified by value_id, otherwise just specifies a named field to be given a value. If field_id represents a sub SELECT (obtained using [gda.sql_builder.SqlBuilder.addSubSelect]), then this method call defines the sub SELECT from which values to insert are taken.</para></listitem>

</itemizedlist>

See also [gda.sql_builder.SqlBuilder.addFieldValue] and [gda.sql_builder.SqlBuilder.addFieldValueAsGvalue].

Parameters

fieldIdthe ID of the field's name or definition
valueIdthe ID of the value to set the field to, or 0