Thin, typed Trino HTTP client for Node 18+ with a simple `query()` API and an async iterator for streaming rows.
npm install @mkven/trino-clientThin, typed Trino HTTP client for Node 18+ with a simple query() API and an async iterator for streaming rows.
``ts
import { TrinoClient } from '@mkven/trino-client';
const trino = new TrinoClient({
endpoint: 'http://localhost:8080',
user: 'dev',
catalog: 'iceberg',
schema: 'default',
});
const result = await trino.query('select 1');
console.log(result.data);
`
- Polling of nextUri until completioniterate()` to stream rows
- Async generator
- Basic and bearer auth support
- Cancellation by query id
- Pluggable fetch (for testing)