{"name":"@clickhouse/client-common","version":"1.17.0","keywords":["clickhouse","sql","client"],"license":"Apache-2.0","_id":"@clickhouse/client-common@1.17.0","maintainers":[{"name":"serdec","email":"sdecri@gmail.com"},{"name":"serge.klochkov","email":"hypnoash@gmail.com"},{"name":"mikhail.shustov-clickhouse","email":"mikhail.shustov@clickhouse.com"},{"name":"michael.anastasakis","email":"michael.anastasakis@clickhouse.com"},{"name":"4b819b88c84b","email":"peter.leonov@clickhouse.com"},{"name":"santrancisco","email":"san.tran@ebfe.pw"},{"name":"hoorayimhelping","email":"d.w.schwarz@gmail.com"},{"name":"tresleches","email":"julio@clickhouse.com"},{"name":"vineethasok","email":"vineeth.asokkumar@clickhouse.com"}],"homepage":"https://clickhouse.com","bugs":{"url":"https://github.com/ClickHouse/clickhouse-js/issues"},"dist":{"shasum":"403f10601e960f002bf4aa3512e7cfd22ac4da74","tarball":"http://registry-npm.ywwl.com/@clickhouse/client-common/download/@clickhouse/client-common-1.17.0.tgz","fileCount":75,"integrity":"sha512-MiwwgXViFAQA2YZkN4ymF1ynzG0K49KeSX9/iOcmJetWkxqSekDdpyp1GjwATWa9R215uQ+hGzJtJujeQVZZIw==","signatures":[{"sig":"MEYCIQChBLdSFd+gGll7MpolG5/vRC66TNIbTmgA7bJPgs0DPQIhAPy9INqqza/HtM5CbPynP29DivnqQN06VbJips+beF/F","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":343724,"size":86353,"noattachment":false,"key":"/@clickhouse/client-common/-/@clickhouse/client-common-1.17.0.tgz"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"4193de529ffdcd25fba7ddbedbbdf57e428b42ae","private":false,"scripts":{"build":"rm -rf dist; tsc","prepack":"cp ../../README.md ../../LICENSE ."},"_npmUser":{"name":"4b819b88c84b","email":"peter.leonov@clickhouse.com"},"repository":{"url":"git+https://github.com/ClickHouse/clickhouse-js.git","type":"git"},"_npmVersion":"11.5.1","description":"Official JS client for ClickHouse DB - common types","directories":{},"_nodeVersion":"24.6.0","dependencies":{},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/client-common_1.17.0_1770372142709_0.1437197943356976","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Deprecated: import from @clickhouse/client or @clickhouse/client-web instead.","readme":"<p align=\"center\">\n<img src=\".static/logo.svg\" width=\"200px\" align=\"center\">\n<h1 align=\"center\">ClickHouse JS client</h1>\n</p>\n<br/>\n<p align=\"center\">\n<a href=\"https://www.npmjs.com/package/@clickhouse/client\">\n<img alt=\"NPM Version\" src=\"https://img.shields.io/npm/v/%40clickhouse%2Fclient?color=%233178C6&logo=npm\">\n</a>\n\n<a href=\"https://www.npmjs.com/package/@clickhouse/client\">\n<img alt=\"NPM Downloads\" src=\"https://img.shields.io/npm/dw/%40clickhouse%2Fclient?color=%233178C6&logo=npm\">\n</a>\n\n<a href=\"https://github.com/ClickHouse/clickhouse-js/actions/workflows/tests-node.yml\">\n<img src=\"https://github.com/ClickHouse/clickhouse-js/actions/workflows/tests-node.yml/badge.svg?branch=main\">\n</a>\n\n<a href=\"https://github.com/ClickHouse/clickhouse-js/actions/workflows/tests-web.yml\">\n<img src=\"https://github.com/ClickHouse/clickhouse-js/actions/workflows/tests-web.yml/badge.svg?branch=main\">\n</a>\n\n<a href=\"https://codecov.io/gh/ClickHouse/clickhouse-js\">\n<img src=\"https://codecov.io/gh/ClickHouse/clickhouse-js/graph/badge.svg?token=B832WB00WJ\">\n</a>\n\n<img src=\"https://api.scorecard.dev/projects/github.com/ClickHouse/clickhouse-js/badge\">\n</p>\n\n## About\n\nOfficial JS client for [ClickHouse](https://clickhouse.com/), written purely in TypeScript, thoroughly tested with actual ClickHouse versions.\n\nThe client has zero external dependencies and is optimized for maximum performance.\n\nThe repository consists of four packages:\n\n- `@clickhouse/client` - a version of the client designed for Node.js platform only. It is built on top of [HTTP](https://nodejs.org/api/http.html)\n  and [Stream](https://nodejs.org/api/stream.html) APIs; supports streaming for both selects and inserts.\n- `@clickhouse/client-web` - a version of the client built on top of [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)\n  and [Web Streams](https://developer.mozilla.org/en-US/docs/Web/API/Streams_API) APIs; supports streaming for selects.\n  Compatible with Chrome/Firefox browsers and Cloudflare workers.\n- `@clickhouse/client-common` - shared common types and the base framework for building a custom client implementation.\n- `@clickhouse/rowbinary` - a library for reading (and soon writing) ClickHouse RowBinary format.\n\n## Installation\n\nNode.js client:\n\n```sh\nnpm i @clickhouse/client\n```\n\nWeb client (browsers, Cloudflare workers):\n\n```sh\nnpm i @clickhouse/client-web\n```\n\n## Environment requirements\n\n### Node.js\n\nNode.js must be available in the environment to run the Node.js client. The client is compatible with all the [maintained](https://github.com/nodejs/release#readme) Node.js releases.\n\n| Node.js version | Supported? |\n| --------------- | ---------- |\n| 26.x            | ✔          |\n| 24.x            | ✔          |\n| 22.x            | ✔          |\n| 20.x            | ✔          |\n\n### TypeScript\n\nIf using TypeScript, version [4.5](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-5.html) or above is required to enable [inline import and export syntax](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-5.html#type-modifiers-on-import-names).\n\n## Compatibility with ClickHouse\n\n| Client version | ClickHouse |\n| -------------- | ---------- |\n| 1.12.0+        | 24.8+      |\n\nThe client may work with older versions too; however, this is best-effort support and is not guaranteed.\n\n## Quick start\n\n```ts\nimport { createClient } from \"@clickhouse/client\"; // or '@clickhouse/client-web'\n\nconst client = createClient({\n  url: process.env.CLICKHOUSE_URL ?? \"http://localhost:8123\",\n  username: process.env.CLICKHOUSE_USER ?? \"default\",\n  password: process.env.CLICKHOUSE_PASSWORD ?? \"\",\n});\n\nconst resultSet = await client.query({\n  query: \"SELECT * FROM system.tables\",\n  format: \"JSONEachRow\",\n});\n\nconst tables = await resultSet.json();\nconsole.log(tables);\n\nawait client.close();\n```\n\nSee more examples in the [examples directory](./examples).\n\n## Documentation\n\nSee the [ClickHouse website](https://clickhouse.com/docs/integrations/javascript) for the full documentation.\n\n## Changelog\n\nEach package keeps its own changelog:\n\n- `@clickhouse/client` — [`packages/client-node/CHANGELOG.md`](./packages/client-node/CHANGELOG.md)\n- `@clickhouse/client-web` — [`packages/client-web/CHANGELOG.md`](./packages/client-web/CHANGELOG.md)\n- `@clickhouse/client-common` (deprecated) — [`packages/client-common/CHANGELOG.md`](./packages/client-common/CHANGELOG.md)\n- `@clickhouse/datatype-parser` — [`packages/datatype-parser/CHANGELOG.md`](./packages/datatype-parser/CHANGELOG.md)\n- `@clickhouse/rowbinary` — [`skills/clickhouse-js-node-rowbinary/CHANGELOG.md`](./skills/clickhouse-js-node-rowbinary/CHANGELOG.md)\n\nHistory through `@clickhouse/client` 1.23.0 lives in the now-frozen repository-wide [`CHANGELOG.md`](./CHANGELOG.md).\n\n## AI Agent Skills\n\nThis repository contains agent skills for working with the client:\n\n- `clickhouse-js-node-troubleshooting` — troubleshooting playbook for the Node.js client.\n\nInstall via CLI:\n\n```sh\n# per project\nnpx skills add ClickHouse/clickhouse-js\n# globally\nnpx skills add ClickHouse/clickhouse-js -g\n```\n\nOr ask your agent to install it for you:\n\n> install agent skills from ClickHouse/clickhouse-js\n\n## Usage examples\n\nWe have a wide range of [examples](./examples), aiming to cover various scenarios of client usage. The overview is available in the [examples README](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/README.md#overview).\n\n## Contact us\n\nIf you have any questions or need help, feel free to reach out to us in the [Community Slack](https://clickhouse.com/slack) (`#clickhouse-js` channel) or via [GitHub issues](https://github.com/ClickHouse/clickhouse-js/issues).\n\n## Contributing\n\nCheck out our [contributing guide](./CONTRIBUTING.md).\n\nIf you'd like to build a client for an alternative runtime (such as Bun or Cloudflare Workers) or an alternative protocol (such as the native ClickHouse protocol or gRPC over a proxy), see [Building specialized clients for alternative runtimes and protocols](./ALTERNATIVE_CLIENTS.md).\n","publish_time":1770372142882,"_cnpm_publish_time":1770372142882,"dist-tags":{"beta":"1.18.2","faster_exception_detection":"0.100.1","head":"1.23.0-head.dbc2960.1","latest":"1.23.0","rc":"1.17.0","tracing_logging_command":"0.4.0"}}