Class LABKEY.Query.ModifyRowsOptions
ModifyRowsOptions class to describe the third 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 |
---|---|
An object containing one property for each HTTP header sent to the server.
|
|
The data object sent to the server.
|
|
The HTTP method used for the request (typically 'GET' or 'POST').
|
|
The URL that was requested.
|
Field Detail
{Object}
headers
An object containing one property for each HTTP header sent to the server.
{Object}
jsonData
The data object sent to the server. This will contain the following properties:
- schemaName: String. The schema name being modified. This is the same schemaName the client passed to the calling function.
- queryName: String. The query name being modified. This is the same queryName the client passed to the calling function.
- rows: Object[]. Array of row objects that map the names of the row fields to their values. The fields required for inclusion for each row depend on the which LABKEY.Query method you are using (updateRows, insertRows or deleteRows).
{"schemaName": "lists", "queryName": "API Test List", "rows": [ {"Key": 1, "FirstName": "Z", "Age": "100"}] }For LABKEY.Query.insertRows: For the 'insertRows' method, the fields of the rows should look the same as they do for the 'updateRows' method, except that primary key values for new rows need not be supplied if the primary key columns are auto-increment. An example of a ModifyRowsOptions object for the 'insertRows' successCallback:
{"schemaName": "lists", "queryName": "API Test List", "rows": [ {"FirstName": "C", "Age": "30"}] }For LABKEY.Query.deleteRows: For the 'deleteRows' method, the fields of the rows should look the same as they do for the 'updateRows' method, except that the 'deleteRows' method needs to supply only the primary key values for the rows. All other row data will be ignored. An example of a ModifyRowsOptions object for the 'deleteRows' successCallback:
{"schemaName": "lists", "queryName": "API Test List", "rows": [ {"Key": 3}] }
{String}
method
The HTTP method used for the request (typically 'GET' or 'POST').
{String}
url
The URL that was requested.