@mkven/trino-client
v0.1.2
Published
Thin, typed Trino HTTP client for Node 18+ with a simple `query()` API and an async iterator for streaming rows.
Readme
@mkven/trino-client
Thin, typed Trino HTTP client for Node 18+ with a simple query() API and an async iterator for streaming rows.
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);Features
- Polling of
nextUriuntil completion - Async generator
iterate()to stream rows - Basic and bearer auth support
- Cancellation by query id
- Pluggable fetch (for testing)
