sql2adt
TypeScript icon, indicating that this package has built-in type declarations

1.5.0 • Public • Published

sql2adt

Run SQL queries against ADT files in Node.js.

Supported SQL clauses (examples):

  • SELECT t1.Column1 AS col1 FROM table1 AS t1
  • SELECT ROWINDEX AS rownum
  • INNER JOIN table2 AS t2 ON t1.id = t2.id
  • WHERE t1.x >= 'aaa' AND t1.x <= 'zzz'
  • LIMIT 5
  • OFFSET 10

Restrictions:

  • Table names, column names and aliases must conform to [A-Za-z_][A-Za-z_0-9]*.
  • Columns in the SELECT clause must have aliases.
  • The WHERE clause only supports basic relative operators and AND.
  • ROWINDEX, LIMIT and OFFSET may only be used in queries on a single table with no WHERE clause.

For more examples of valid and invalid queries, consult the unit tests.

Dependencies (0)

    Dev Dependencies (9)

    Package Sidebar

    Install

    npm i sql2adt

    Weekly Downloads

    1

    Version

    1.5.0

    License

    MIT

    Unpacked Size

    82.1 kB

    Total Files

    20

    Last publish

    Collaborators

    • yortus