{"id":25824544,"url":"https://github.com/sweetops/xk6-cql","last_synced_at":"2026-02-24T03:08:47.584Z","repository":{"id":279335659,"uuid":"936198943","full_name":"SweetOps/xk6-cql","owner":"SweetOps","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-21T02:10:56.000Z","size":182,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-21T13:46:37.886Z","etag":null,"topics":["cassandra","cql","xk6"],"latest_commit_sha":null,"homepage":"","language":"Go","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/SweetOps.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-20T17:27:48.000Z","updated_at":"2026-01-21T02:10:58.000Z","dependencies_parsed_at":"2025-02-25T03:32:31.854Z","dependency_job_id":"322b6c08-1b4e-416e-b865-abb0e0e8d9d7","html_url":"https://github.com/SweetOps/xk6-cql","commit_stats":null,"previous_names":["sweetops/xk6-cql"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/SweetOps/xk6-cql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SweetOps%2Fxk6-cql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SweetOps%2Fxk6-cql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SweetOps%2Fxk6-cql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SweetOps%2Fxk6-cql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SweetOps","download_url":"https://codeload.github.com/SweetOps/xk6-cql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SweetOps%2Fxk6-cql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29770393,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T03:07:52.931Z","status":"ssl_error","status_checked_at":"2026-02-24T03:07:49.415Z","response_time":75,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","xk6"],"created_at":"2025-02-28T12:53:13.635Z","updated_at":"2026-02-24T03:08:47.579Z","avatar_url":"https://github.com/SweetOps.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xk6-cql\n\n### Configuration options\n\nThe following table describes the available configuration options for connecting to a Cassandra cluster:\n\n| Option Name       | Type        | Default Value | Required | Description |\n|------------------|------------|--------------|----------|-------------|\n| **`hosts`** | `[]string` | `[]` | Yes | A list of Cassandra node addresses to connect to. |\n| **`keyspace`** | `string` | `\"\"` | Yes | The keyspace to use for queries. |\n| **`username`** | `string` | `\"\"` | No | The username for authentication. |\n| **`password`** | `string` | `\"\"` | No | The password for authentication. |\n| **`protocolVersion`** | `int` | `\"\"` | No | The Cassandra protocol version to use. |\n| **`timeout`** | `duration` | `\"10s\"` | No | The maximum duration to wait before a connection attempt times out. |\n| **`consistency`** | `string` | `\"quorum\"` | No | The consistency level for queries (Possible values: `all`, `any`, `one`, `two`, `three`, `each_quorum`, `quorum`, `local_one`, `local_quorum`). |\n| **`tls`** | `tls` | `{}` | No | The TLS settings for secure connections. |\n\n\n#### TLS Configuration\n\n| Option Name                  | Type     | Default Value | Required | Description |\n|------------------------------|---------|--------------|----------|-------------|\n| **`cert_path`** | `string` | `\"\"` | No | Path to the client certificate file. |\n| **`key_path`** | `string` | `\"\"` | No | Path to the client private key file. |\n| **`ca_path`** | `string` | `\"\"` | No | Path to the CA certificate file for verifying the server. |\n| **`enable_host_verification`** | `bool` | `false` | No | Whether to verify the server hostname in the TLS certificate. |\n\n\n### Available Methods\n\n#### `session()`\n\nInitializes a new session for interacting with the Cassandra database.\n\n```javascript\nlet client = cql;\n\nclient.session({\n    hosts: [\"10.10.0.1\"],\n    keyspace: \"system\",\n});\n```\n\n#### `exec(query string)`\nExecutes a CQL query.\n\n```javascript\nlet client = cql;\n\nclient.session({\n    hosts: [\"10.10.0.1\"],\n    keyspace: \"system\",\n});\n\nclient.exec(`\n    CREATE KEYSPACE IF NOT EXISTS test_keyspace \n    WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};\n`);\n```\n#### `batch(batchType string, queries []string)`\nExecutes a batch of CQL queries with the specified batch type.\n\n`batchType` – The type of batch to execute. Possible values: `logged`, `unlogged`, `counter`,\n\n```javascript\nlet client = cql;\n\nclient.session({\n    hosts: [\"10.10.0.1\"],\n    keyspace: \"system\",\n});\n\nclient.batch(\"\", [\n    `SELECT * FROM users WHERE id = 'test';`,\n    `SELECT * FROM users WHERE name = 'test';`,\n    ])\n```\n\n#### `close()`\nCloses the active session and releases resources.\n\n```javascript\nlet client = cql;\n\nclient.session({\n    hosts: [\"10.10.0.1\"],\n    keyspace: \"system\",\n});\n\nclient.close()\n```\n\n\n### Build for development\n\n```sh\ngit clone git@github.com:SweetOps/xk6-cql.git\ncd xk6-cql\nxk6 build --with github.com/SweetOps/xk6-cql@latest=.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsweetops%2Fxk6-cql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsweetops%2Fxk6-cql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsweetops%2Fxk6-cql/lists"}