# trino-ts

> Typescript lib that enable projects to interact with the SQL Query engine Trino

Latest version **3.0.3** (published 2022-11-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install trino-ts
pnpm add trino-ts
yarn add trino-ts
bun add trino-ts
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.3 |
| Published | 2022-11-10 |
| First published | 2022-10-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 48.7 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Lucas Manerich |
| Maintainers | manerixx |
| Keywords | trino, bigdata, presto, typescript |

## Links

- npm: https://www.npmjs.com/package/trino-ts
- Repository: https://github.com/LucasManerich/trino-ts
- Homepage: https://github.com/LucasManerich/trino-ts#readme
- Issues: https://github.com/LucasManerich/trino-ts/issues
- npm.io page: https://npm.io/package/trino-ts

## Dependencies (3)

- [chai](https://npm.io/package/chai.md) ^4.3.0
- [axios](https://npm.io/package/axios.md) ^0.21.1
- [@types/node](https://npm.io/package/@types/node.md) ^14.14.25

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 3.0.3 (latest) — 2022-11-10
- 3.0.2 — 2022-11-07
- 3.0.1 — 2022-10-11
- 3.0.0 — 2022-10-05

## README

# Trino TS

trino-ts is a lib for JavaScript/TypeScript that allows the interaction and execution of queries in Trino (formerly known as Presto).


## Installation

Add the dependency to your project using your favorite dependency manager.

```bash
npm install --save trino-ts
```

or 

```bash
yarn add trino-ts
```


## Example
```typescript
import { Trino, TrinoQueryParams, TrinoResponse } from  'trino-ts';

const updatesNotification = (response: TrinoResponse) => {
  console.log(response)
}

const errorNotification = (error: Error) => {
  console.error(error)
}

const trinoInstance = new Trino({
  catalog: 'bigdata_catalog',
  schema: 'bigdata_schema',
  user: 'root',
  password: 'any_password',
  host: '127.0.0.1',
  port: '8080',
  source: 'NodeJS Trino Connector',
  checkStatusInterval: 1000, //1s
  isBasicAuth: true,
  isHttps: false,
  query: 'SELECT * FROM tbcliente',
  errorNotification,
  updatesNotification
})
trinoInstance.go()
```

---
_Source: https://npm.io/package/trino-ts · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
