Class LABKEY.Query.ModifyRowsResults
ModifyRowsResults class to describe the first object passed to the successCallback function by LABKEY.Query.updateRows, LABKEY.Query.insertRows or LABKEY.Query.deleteRows. This object's properties are useful for matching requests to responses, as HTTP requests are typically processed asynchronously.
Additional Documentation:
Defined in: Query.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
Will be "update", "insert", or "delete" depending on the API called.
|
|
Objects will contain the properties 'id' (the field to which the error is related, if any),
and 'msg' (the error message itself).
|
|
Contains the same queryName the client passed to the calling function.
|
|
Array of rows with field values for the rows updated, inserted,
or deleted, in the same order as the rows supplied in the request.
|
|
Indicates the number of rows affected by the API action.
|
|
Contains the same schemaName the client passed to the calling function.
|
Class Detail
LABKEY.Query.ModifyRowsResults()
For example:{ "schemaName": "lists", "queryName": "API Test List" "rowsAffected": 1, "command": "insert", "errors": [], "rows": [{ Key: 3, StringField: 'NewValue'}] }
Field Detail
{String}
command
Will be "update", "insert", or "delete" depending on the API called.
{Array}
errors
Objects will contain the properties 'id' (the field to which the error is related, if any),
and 'msg' (the error message itself).
{String}
queryName
Contains the same queryName the client passed to the calling function.
{Object[]}
rows
Array of rows with field values for the rows updated, inserted,
or deleted, in the same order as the rows supplied in the request. For insert, the
new key value for an auto-increment key will be in the returned row's field values.
For insert or update, the other field values may also be different than those supplied
as a result of database default expressions, triggers, or LabKey's automatic tracking
feature, which automatically adjusts columns of certain names (e.g., Created, CreatedBy,
Modified, ModifiedBy, etc.).
{Integer}
rowsAffected
Indicates the number of rows affected by the API action.
This will typically be the same number of rows passed in to the calling function.
{String}
schemaName
Contains the same schemaName the client passed to the calling function.