GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing docs.voltactivedata.com — ARRAY_LENGTH() Using VoltDBARRAY_LENGTH()ARRAY_LENGTH() — Returns the number of elements in a JSON array. SynopsisARRAY_LENGTH( JSON-array ) DescriptionThe ARRAY_LENGTH() returns the length of a JSON array; that is, the number of elements the array contains. The length is returned as an integer. The ARRAY_LENGTH() function can be combined with other functions, such as FIELD(), to traverse more complex JSON structures. The function returns NULL if the argument is a valid JSON string but does not represent an array. The function returns an error if the argument is not a valid JSON string. ExampleThe following example uses the ARRAY_LENGTH(), ARRAY_ELEMENT(), and FIELD() functions to return the last element of an array in a larger JSON string. The functions perform the following actions:
SELECT ARRAY_ELEMENT(FIELD(messages,'alerts'),
ARRAY_LENGTH(FIELD(messages,'alerts'))-1) AS last_alert,
station FROM reportlog
WHERE station=?; |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |