Package Exports
- trino-client
- trino-client/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (trino-client) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
trino-js-client
Features
- Connections over HTTP or HTTPS
- Supports HTTP Basic Authentication
- Per-query user information for access control
Requirements
- Node 12 or newer.
- Trino 0.16x or newer.
Install
npm install trino-client or yarn add trino-client
Usage
const trino = new Trino({
server: 'http://localhost:8080'
catalog: 'tpcds',
schema: 'sf100000',
auth: new BasicAuth('test'),
});
const queryIter = await trino.query('select * from customer limit 100');
const data = await queryIter.fold<QueryData[]>([], (row, acc) => [
...acc,
...(row.data ?? []),
]);More usage examples can be found in the integration tests.
Filipe Regadas (regadas) 2022