Difference between revisions of "ODATA READ()"
From Lianjapedia
Yvonne.milne (Talk | contribs) |
Yvonne.milne (Talk | contribs) |
||
Line 15: | Line 15: | ||
!width="20%"|Parameter||width="20%"|Required||Description | !width="20%"|Parameter||width="20%"|Required||Description | ||
|- | |- | ||
− | |valign="top"|<cURI>||valign="top"|Yes||valign="top"|The OData URI - see [[OData URIs]] for full details. | + | |valign="top"|<cURI>||valign="top"|Yes||valign="top"|The OData URI - see [[OData URIs#OData_Functions|OData URIs]] for full details. |
|- | |- | ||
|valign="top"|<cFilename>||valign="top"|No||valign="top"|Name of file to which data will be saved. | |valign="top"|<cFilename>||valign="top"|No||valign="top"|Name of file to which data will be saved. |
Revision as of 12:41, 1 February 2017
Under Construction
Contents
Purpose
OData-compatible function to read records
Syntax
ODATA_READ(<cURI> [,<cFilename>])
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_DELETE(), ODATA_UPDATE(), PRINT_JSON(), SELECT, UPDATE
Description
The ODATA_READ() function is used to read records. The data is returned as JSON.
Parameter | Required | Description |
---|---|---|
<cURI> | Yes | The OData URI - see OData URIs for full details. |
<cFilename> | No | Name of file to which data will be saved. |
Example
// 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")