{"id":15713849,"url":"https://github.com/lanjoni/scylladb-crystal-driver","last_synced_at":"2025-05-12T21:55:52.192Z","repository":{"id":168872321,"uuid":"644673102","full_name":"lanjoni/scylladb-crystal-driver","owner":"lanjoni","description":"ScyllaDB Crystal Driver 💎","archived":false,"fork":false,"pushed_at":"2023-05-30T19:10:42.000Z","size":37,"stargazers_count":18,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-20T18:39:41.225Z","etag":null,"topics":["binding","cql","crystal","driver","scylladb"],"latest_commit_sha":null,"homepage":"","language":"Crystal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lanjoni.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":"2023-05-24T02:43:37.000Z","updated_at":"2024-09-23T16:00:58.000Z","dependencies_parsed_at":"2024-10-24T11:55:59.929Z","dependency_job_id":"824b47da-0d7f-43b0-8cf3-8fb50cbe76b7","html_url":"https://github.com/lanjoni/scylladb-crystal-driver","commit_stats":null,"previous_names":["lanjoni/scylladb-crystal-driver"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lanjoni%2Fscylladb-crystal-driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lanjoni%2Fscylladb-crystal-driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lanjoni%2Fscylladb-crystal-driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lanjoni%2Fscylladb-crystal-driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lanjoni","download_url":"https://codeload.github.com/lanjoni/scylladb-crystal-driver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253830883,"owners_count":21971000,"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":["binding","cql","crystal","driver","scylladb"],"created_at":"2024-10-03T21:33:49.275Z","updated_at":"2025-05-12T21:55:52.170Z","avatar_url":"https://github.com/lanjoni.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/lanjoni/scylladb-crystal-driver\"\u003e\n    \u003cimg src=\"https://www.scylladb.com/wp-content/uploads/scylla-opensource-1.png\" alt=\"ScyllaDB Logo\" width=\"150\"\u003e\n    \u003cimg src=\"https://cdn.freebiesupply.com/logos/large/2x/crystal-1-logo-png-transparent.png\" alt=\"Crystal Logo\" width=\"150\"\u003e\n  \u003c/a\u003e\n  \n  \u003ch1 align=\"center\"\u003eScyllaDB Crystal Driver\u003c/h1\u003e\n\n  \u003cp align=\"center\"\u003e\n    A Crystal wrapper around the \u003ca href=\"https://github.com/kaukas/crystal-cassandra\"\u003eCrystal DB API for Cassandra\u003c/a\u003e and \u003ca href=\"https://github.com/scylladb/cpp-driver\"\u003eC/C++ Driver for ScyllaDB\u003c/a\u003e.\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://docs.scylladb.com/stable/\"\u003e\u003cstrong\u003eExplore the ScyllaDB docs »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/lanjoni/scylladb-crystal-driver/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/lanjoni/scylladb-crystal-driver/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## About\n\nThis project aims to build an environment for interoperability and use of ScyllaDB with the Crystal programming language, aiming at building a driver and wrapper for communication.\n\n## Installation\n\nPlease make sure you have installed the [C/C++ Driver for ScyllaDB](https://github.com/scylladb/cpp-driver).\n\nThen add this to your application's `shard.yml`:\n\n```yml\ndependencies:\n  scylladb:\n    github: lanjoni/scylladb-crystal-driver\n```\n\n## Documentation\n\n- [ScyllaDB Documentation](https://docs.scylladb.com/stable/)\n- [C/C++ Driver for ScyllaDB](https://github.com/scylladb/cpp-driver)\n- [Crystal DB API for Cassandra](https://github.com/kaukas/crystal-cassandra)\n- [DataStax C/C++ Driver](https://docs.datastax.com/en/developer/cpp-driver/2.10/)\n\n## Usage\n\nFrom the [basic example](https://github.com/lanjoni/scylladb-crystal-driver/blob/main/examples/basic.cr):\n\n```cr\nrequire \"scylladb/dbapi\"\n\nDB.open(\"scylladb://127.0.0.1/test\") do |db|\n  db.exec(\u003c\u003c-CQL)\n    create table posts (\n      id timeuuid primary key,\n      title text,\n      body text,\n      created_at timestamp\n    )\n  CQL\n  db.exec(\"insert into posts (id, title, body, created_at) values (now(), ?, ?, ?)\",\n          \"Hello World\",\n          \"Hello, World. I have a story to tell.\",\n          Time.now)\n  db.query(\"select title, body, created_at from posts\") do |rs|\n    rs.each do\n      title = rs.read(String)\n      body = rs.read(String)\n      created_at = rs.read(Time)\n      puts title\n      puts \"(#{created_at})\"\n      puts body\n    end\n  end\nend\n```\nPlease refer to [crystal-db](https://github.com/crystal-lang/crystal-db) for further usage instructions.\n\n## Types\n\n`scylladb-crystal-driver` supports [all the `DB::Any`](https://crystal-lang.github.io/crystal-db/api/0.5.0/DB/Any.html) primitive types plus `Int8`, `Int16` and some additional value types:\n- `date` maps to `ScyllaDB::DBApi::Date`\n- `time` maps to `ScyllaDB::DBApi::Time`\n- `uuid` maps to `ScyllaDB::DBApi::Uuid`\n- `timeuuid` maps to `ScyllaDB:DBApi::TimeUuid`\n\nSome of the collection types are also supported:\n- `list` maps to `Array`\n- `set` maps to `Set`\n- `map` maps to `Hash`\n\n## Development\n\nAfter installation is complete run:\n\n```sh\n$ crystal spec\n```\n\u003e This command runs the tests to verify that everything is working correctly.\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n## Contributors\n\n* [lanjoni](https://github.com/lanjoni) -\n  **João Lanjoni** \u003c\u003cguto@lanjoni.dev\u003e\u003e (he/him)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flanjoni%2Fscylladb-crystal-driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flanjoni%2Fscylladb-crystal-driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flanjoni%2Fscylladb-crystal-driver/lists"}