Skip to content

Recordset

Mathias Rangel Wulff edited this page Jun 12, 2015 · 5 revisions

Keyword RECORDSET

AlaSQL modifier for SELECT queries.

    SET @data = @[{a:1,b:10},{a:2,b:20}];
    SELECT a, b FROM @data;
    // returns array of objects [{a:1,b:10},{a:2,b:20}]

    SELECT RECORDSET a, b FROM @data;
    // returns array of objects {data:[{a:1,b:10},{a:2,b:20}], 
          columns:[{columnid:'a'},{columnid:'b'}]}

You can change also query modifier with AlaSQL options:

    alasql.options.modifier = 'RECORDSET';

By default, all nestes subqueries returns data as Recordset.

See also: VALUE, MATRIX

Clone this wiki locally