Platform SDK: Indexing Service

Update Operators

The following list describes the update operators.

DBOP_delete
Removes rows from a table. This operator takes two inputs — one required and one optional The required input is a DBOP_table_name node describing the table being updated. The optional input is a table-valued expression representing the rows to be deleted. If the optional input is not provided, all rows of the table specified in the first required input are deleted. The requirement as to whether the input table being updated must be a base table is provider specific.
DBOP_update
Modifies the values of one or more columns in rows, from a table, that satisfy a condition. This operator takes two required inputs. The first is a table-valued expression describing the set of rows being updated. The second is a DBOP_set_list_anchor node containing the update expressions (for example, SET A = A + 1, B = B - 5). The column names represented in the DBOP_set_list_elements must be unambiguous. That is, in cases where the tuples to be updated are defined by a join expression over multiple tables, and a column being updated appears in more than one table, the reference to the updated column must be fully qualified (DBOP_qualified_column_name). For example, the update statement
UPDATE A INNER JOIN B ON A.F1=B.F1 SET A.X = 1, B.Y = 2 WHERE A.Z =10

is represented by an update node whose first input is a subtree representing the expression

A INNER JOIN B ON A.F1=B.F1 AND A.Z = 10

and the second input is a DBOP_set_list_anchor containing two list elements for A.X = 1, and B.Y = 2. The requirement as to whether the input table being updated must be a base table is provider specific.

DBOP_insert
Adds rows to a table. This operator specifies three arguments: one required row_constructor or table_constructor, one required table, and one required column_list. The number of elements of column_list must match the number of values in the constructed row(s). Columns not listed in the column_list must have default values or be capable of containing NULL values. Requirements as to whether table input must be a base table are provider specific.