open-index/open-npm huggingface dataset:
npm package: @mkven/trino-client
Description: Thin, typed Trino HTTP client for Node 18+ with a simple `query()` API and an async iterator for streaming rows.
Latest version: 0.1.2

# @mkven/trino-client

Thin, 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);
```

## Features

- Polling of `nextUri` until completion
- Async generator `iterate()` to stream rows
- Basic and bearer auth support
- Cancellation by query id
- Pluggable fetch (for testing)