{"id":19542627,"url":"https://github.com/fed135/scylla-driver","last_synced_at":"2026-02-08T13:37:22.155Z","repository":{"id":77974143,"uuid":"98504303","full_name":"fed135/scylla-driver","owner":"fed135","description":"Node.js Driver for the scylla database engine [WIP]","archived":false,"fork":false,"pushed_at":"2024-12-20T20:03:08.000Z","size":367,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-04T16:42:00.757Z","etag":null,"topics":["cassandra","cql","database","driver","hacktoberfest","nosql","scylla","scylladb"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fed135.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-27T07:00:39.000Z","updated_at":"2024-12-21T17:37:31.000Z","dependencies_parsed_at":"2023-03-06T03:30:49.122Z","dependency_job_id":null,"html_url":"https://github.com/fed135/scylla-driver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fed135%2Fscylla-driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fed135%2Fscylla-driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fed135%2Fscylla-driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fed135%2Fscylla-driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fed135","download_url":"https://codeload.github.com/fed135/scylla-driver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251025767,"owners_count":21524860,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cassandra","cql","database","driver","hacktoberfest","nosql","scylla","scylladb"],"created_at":"2024-11-11T03:15:21.554Z","updated_at":"2026-02-08T13:37:17.094Z","avatar_url":"https://github.com/fed135.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ScyllaDB Node.js Driver\n\n## Work in progress - do not use!\n\n---\n\n**Disclaimer** I am not associated in any way with [ScyllaDB](https://github.com/scylladb) or [Datastax](https://github.com/datastax).\n\n---\n\n## Install\n\n```bash\n$ npm install scylladb\n```\n\n\n## Usage\n\n- [API documentation](https://github.com/fed135/scylla-driver/wiki/API-Documentation)\n\n### Connecting\n\n```typescript\nimport {createClient} from 'scylladb';\n\nconst client = createClient({\n  hosts: ['0.0.0.0', '0.0.0.1'],\n  keyspace: 'ks1'\n});\n```\n\n### Querying\n\nQuery methods return a **Promise**.\n\n```typescript\n// Simple statements\nclient.query('SELECT * FROM users')\n  .then(result =\u003e console.log(`User with email ${result.rows[0].email}`));\n\n// Automatically detects prepared steatements\nclient.query('SELECT name, email FROM users WHERE key = ?', [ 'someone' ])\n  .then(result =\u003e console.log(`User with email ${result.rows[0].email}`));\n```\n\n### Row streaming\n\nIt can be **piped** downstream and provides automatic pause/resume logic (it buffers when not read).\n\n```typescript\nconst stream = client.stream('SELECT time, val FROM temperature WHERE station_id=', [ 'abc' ]);\n\nstream.on('readable', function () {\n    // readable is emitted as soon a row is received and parsed\n    let row;\n    while (row = this.read()) {\n      stream.pause();\n      console.log(`time ${row.time} and value ${row.value}`);\n      stream.resume();\n    }\n  })\n  .on('end', function () {\n    // emitted when all rows have been retrieved and read\n  })\n  .on('error', function (err) {\n    console.log(`Error: ${err}`)\n  });\n```\n\n\n## Logging\n\nScyllaDB driver uses the `NODE_DEBUG` environment variable.\n\n```\nNODE_DEBUG=scylladb:\u003cpriority\u003e\n```\n\nThe `priority` being passed to debug can be `info`, `warn` or `error`. If no level is specified, the default setting is `warn`.\n\n\n## Tests\n\nOnce you have a database setup with a keyspace named \"test\" and a table \"users\".  \n\nHelp can be found in the [wiki](https://github.com/fed135/scylla-driver/wiki).\n\n\n```bash\nnpm run test\n```\n\n## TODO\n\n- [x] Zero-copy stream reading\n- [ ] Refactor (figure best paradigm to reduce instantiation and complexity while preventing user access to internals)\n- [ ] Query options\n- [ ] Query stats / timeouts\n- [ ] Cassandra types marshalling\n- [ ] Prepared statements\n- [ ] Streaming queries\n- [ ] Query buffering and QueryContext (attempt to reuse same connection to send multiple frames at once)\n- [ ] Transactions (Batch queries)\n- [ ] Cluster topology\n- [ ] Connection pooling and load balancing\n- [ ] Host selection and sharding\n- [ ] Schema loading\n- [ ] Dynamic types\n- [ ] Geospatial points\n- [ ] Authentication flows\n- [ ] TLS/SSL\n- [ ] Binary API compatibility\n- [ ] Query warnings (server) and static statement validation (client)\n- [ ] User-defined functions and aggregates\n- [ ] Unit tests\n- [ ] Integration tests\n- [ ] Benchmark comparisons with Datastax driver\n- [ ] Import Cassandra custom Murmur3 algo (Which scylla also uses)\n\n## Features from the Datastax driver that will not be supported\n\nIn order to keep the driver performant and reduce complexity a few choices were made to strip or replace some of the features present in the Datastax Cassandra driver.\n\n- Address resolution\n  - Must be handled in app config\n- Concurrent execution\n  - QueryContext can be used to bundle requests and limit bandwidth\n- Datastax astra\n  - This driver focuses on Scylladb, might instead develop helpers for their DBAAS\n- Execution profiles\n  - Must be handled in app design\n- Mappers\n  - Must be handled in app design\n  - The library provides deep Typescript definitions and helpers to facilitate development \n- Callbacks and async iterators\n  - The library will only support streams and promises\n- Speculative query executions\n  - This introduces a lot of complexity and unecessary load (queries cannot be aborted)\n  - Scylla generally has fewer and shorter gc cycles\n- Query retrying\n  - Must be handled in app design\n- Legacy support\n  - Only the 2 latest Binary protocols will be supported (4,5)\n\n## Contribute\n\nI am always looking for help. Reach out to get involved!\n\n## License \n\n[Apache 2.0](LICENSE) (c) 2017-2024 Frederic Charette\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffed135%2Fscylla-driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffed135%2Fscylla-driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffed135%2Fscylla-driver/lists"}