ODATA DELETE()
From Lianjapedia
Contents
Purpose
OData-compatible function to delete records
Syntax
ODATA_DELETE(<cURI>,<cJSONdatastring>)
See Also
APPEND BLANK, APPEND FROM, APPEND FROM ARRAY, DELETE (NoSQL), DELETE (SQL), INSERT, JSON_DECODE(), JSON_DECODE_FILE(), JSON_ENCODE(), OData Operators, OData URIs, ODATA_CREATE(), ODATA_READ(), ODATA_UPDATE(), PRINT_JSON(), SELECT, UPDATE
Description
The ODATA_DELETE() function is used to delete records.
Parameter | Required | Description |
---|---|---|
<cURI> | Yes | The OData URI - see OData URIs for full details. |
<cJSONdatastring> | Yes | JSON string containing the name/value pair(s) to identify the record(s) to be deleted. |
Example
// All records that match the name/value pairs will be deleted // Here all the order_details records with an orderid of 10951 // will be deleted cDeleteString = '{"orderid":10951}' odata_delete("/southwind/order_details",cDeleteString) // OData-compatible functions odata_read("/southwind/shippers") odata_read("/southwind/shippers","readresults.txt") ? filetostr("readresults.txt") cCreateString = '{"shipperid":4,"companyname":"Acme Inc.","phone":"(503) 555-1234"}' odata_create("/southwind/shippers",cCreateString) odata_read("/southwind/shippers") cUpdateString = '{"phone":"(503) 555-5678", "__olddata":{"shipperid":4}}' odata_update("/southwind/shippers",cUpdateString) odata_read("/southwind/shippers") cDeleteString = '{"shipperid":4}' odata_delete("/southwind/shippers",cDeleteString) odata_read("/southwind/shippers")