The core elements are available as generic Web Components. They are library/framework agnostic, and can be used in any Web project irrespective of what its built upon.
Two ways to get them:
Published as a NPM package in https://www.npmjs.com/package/queryflow.
The recommended way. Versioned, published on the standard public JavaScript module registry NPM with dependencies.
Quick example via the Editor Demo App:
# From
"queryflow": "link:../../../../dist",
# To
"queryflow": "4.99.43",
yarn
yarn start
That’s for developing. Here is a similar example to the Parser Demo documentation page with the demo parser app.
cd tools/examples/api/parsers
yarn
yarn webpack
yarn app
In parsers package.json
there is a dependency on Compose:
"dependencies": {
queryflow "link:../../.."
},
Now let’s import the DBSQL parser:
import sqlAutocompleteParser from 'queryflow/js/parse/sql/dbsql/dbsqlAutocompleteParser';
sqlAutocompleteParser.parseSql('SELECT col1, col2, tbl2.col3 FROM tbl; ', '')