{"id":13624889,"url":"https://github.com/simplereach/helenus","last_synced_at":"2025-10-04T16:31:57.544Z","repository":{"id":2096560,"uuid":"3037226","full_name":"simplereach/helenus","owner":"simplereach","description":"NodeJS Cassandra Driver","archived":true,"fork":false,"pushed_at":"2014-05-06T14:50:19.000Z","size":1402,"stargazers_count":181,"open_issues_count":3,"forks_count":64,"subscribers_count":44,"default_branch":"master","last_synced_at":"2025-09-11T04:24:14.159Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simplereach.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-12-22T23:03:54.000Z","updated_at":"2025-07-17T15:23:43.000Z","dependencies_parsed_at":"2022-09-07T16:40:11.489Z","dependency_job_id":null,"html_url":"https://github.com/simplereach/helenus","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/simplereach/helenus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplereach%2Fhelenus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplereach%2Fhelenus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplereach%2Fhelenus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplereach%2Fhelenus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simplereach","download_url":"https://codeload.github.com/simplereach/helenus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplereach%2Fhelenus/sbom","scorecard":{"id":825618,"data":{"date":"2025-08-11","repo":{"name":"github.com/simplereach/helenus","commit":"c85a6e813171223f339ef246420b84ec0d00f33e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":1,"reason":"Found 4/27 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T16:34:31.327Z","repository_id":2096560,"created_at":"2025-08-23T16:34:31.327Z","updated_at":"2025-08-23T16:34:31.327Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278342713,"owners_count":25971396,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-08-01T21:01:47.736Z","updated_at":"2025-10-04T16:31:57.207Z","avatar_url":"https://github.com/simplereach.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Helenus\n\n\n### This driver uses the old Thrift protocol, if you are using Cassandra 1.2 or higher and you are using CQL, please consider using [node-cassandra-cql](https://github.com/jorgebay/node-cassandra-cql). While I will continue to fix bugs with this driver, feature development is frozen as many new features coming out will not be supported by Thrift.\n\n\n  NodeJS Bindings for Cassandra\n\n  Currently the driver has full CQL support and a growing support for thrift (non-cql) commands.\n  If you would like to contribute, please contact Russ Bradberry \u0026lt;rbradberry@simplereach.com\u0026gt;\n\n  If you have any questions regarding the driver, please visit our [google group](https://groups.google.com/forum/?fromgroups#!forum/helenus)\n\n\n### Build Status\n\n  [![Build Status](https://secure.travis-ci.org/simplereach/helenus.png)](http://travis-ci.org/simplereach/helenus)\n\n## Installation\n\n    npm install helenus\n\n## Running Tests\n\n  Ensure cassandra is running on localhost:9160.\n\n    make test\n\n  For coverage\n\n    make test-cov\n\n## Usage\n\n## CQL\n\n```javascript\n  var helenus = require('helenus'),\n      pool = new helenus.ConnectionPool({\n        hosts      : ['localhost:9160'],\n        keyspace   : 'helenus_test',\n        user       : 'test',\n        password   : 'test1233',\n        timeout    : 3000\n        //cqlVersion : '3.0.0' // specify this if you're using Cassandra 1.1 and want to use CQL 3\n      });\n\n  //optionally you can supply the 'getHost' parameter to the connection pool options which will\n  // allow you to override the default random host decision\n\n  //if you don't listen for error, it will bubble up to `process.uncaughtException`\n  //pools act just like connection objects, so you don't have to worry about api\n  //differences when using either the pool or the connection\n  pool.on('error', function(err){\n    console.error(err.name, err.message);\n  });\n\n  //makes a connection to the pool, this will return once there is at least one\n  //valid connection, other connections may still be pending\n  pool.connect(function(err, keyspace){\n    if(err){\n      throw(err);\n    } else {\n      //to use cql, access the pool object once connected\n      //the first argument is the CQL string, the second is an `Array` of items\n      //to interpolate into the format string, the last is the callback\n      //for formatting specific see `http://nodejs.org/docs/latest/api/util.html#util.format`\n      //results is an array of row objects\n\n      pool.cql(\"SELECT col FROM cf_one WHERE key = ?\", ['key123'], function(err, results){\n        console.log(err, results);\n      });\n\n      //NOTE:\n      //- You can always skip quotes around placeholders, they are added automatically.\n      //- In CQL 3 you cannot use placeholders for ColumnFamily names or Column names.\n    }\n  });\n```\n\n## Thrift\n\nIf you do not want to use CQL, you can make calls using the thrift driver\n\n```javascript\n  pool.connect(function(err, keyspace){\n    if(err){\n      throw(err);\n    }\n\n    //first retreive the column family from the server\n    //helenus will cache column families it has already seen\n    keyspace.get('my_cf', function(err, cf){\n      if(err){\n        throw(err);\n      }\n\n      //insert something into the column family\n      cf.insert('foo', {'bar':'baz'}, function(err){\n        if(err){\n          throw(err);\n        }\n\n        //get what we just put in\n        //the driver will return a helenus.Row object just like CQL\n        cf.get('foo', {consistency:helenus.ConsistencyLevel.ONE}, function(err, row){\n          if(err){\n            throw(err);\n          }\n\n          row.get('bar').value // =\u003e baz\n        });\n      });\n    });\n\n  });\n```\n\n### Thrift Support\n\nCurrently Helenus supports the following command for the thrift side of the driver:\n\n  * connection.createKeyspace\n  * connection.dropKeyspace\n  * keyspace.createColumnFamily\n  * keyspace.dropColumnFamily\n  * columnFamily.insert\n  * columnFamily.get\n  * columnFamily.getIndexed\n  * columnFamily.remove\n  * columnFamily.truncate\n\nThe following support is going to be added in later releases:\n\n  * columnFamily.rowCount\n  * columnFamily.columnCount\n  * columnfamily.increment\n  * SuperColumns\n  * CounterColumns\n  * Better composite support\n\n## Row\n\nThe Helenus Row object acts like an array but contains some helper methods to\nmake your life a bit easier when dealing with dynamic columns in Cassandra\n\n### row.count\n\nReturns the number of columns in the row\n\n### row[N]\n\nThis will return the column at index N\n\n    results.forEach(function(row){\n      //gets the 5th column of each row\n      console.log(row[5]);\n    });\n\n### row.get(name)\n\nThis will return the column with a specific name\n\n    results.forEach(function(row){\n      //gets the column with the name 'foo' of each row\n      console.log(row.get('foo'));\n    });\n\n### row.forEach()\n\nThis is wrapper function of Array.forEach which return name,value,ts,ttl of column from row as callback params.\n\n    results.forEach(function(row){\n      //all row of result\n      row.forEach(function(name,value,ts,ttl){\n        //all column of row\n        console.log(name,value,ts,ttl);\n      });\n\n    });\n\n### row.slice(start, finish)\n\nSlices columns in the row based on their numeric index, this allows you to get\ncolumns x through y, it returns a Helenus row object of columns that match the slice.\n\n    results.forEach(function(row){\n      //gets the first 5 columns of each row\n      console.log(row.slice(0,5));\n    });\n\n### row.nameSlice(start, finish)\n\nSlices the columns based on part of their column name. returns a Helenus row of columns\nthat match the slice\n\n    results.forEach(function(row){\n      //gets all columns that start with a, b, c, or d\n      console.log(row.nameSlice('a','e'));\n    });\n\n## Column\n\nColumns are returned as objects with the following structure:\n\n```javascript\n  {\n    name: 'Foo',       //The column name\n    value: 'bar',      //The column value\n    timestamp: Date(), //The date object of the timestamp for the column\n    ttl: 123456        //The ttl (in milliseconds) for the columns\n  }\n```\n\n## ConsistencyLevel\n\nHelenus supports using a custom consistency level. By default, when using the thrift client reads and writes will both use `QUORUM`. When using the thrift driver, you simply pass a custom level in the options:\n\n```javascript\ncf.insert(key, values, {consistency : helenus.ConsistencyLevel.ANY}, callback);\n```\n\n\n## Contributors\n\n* Russell Bradberry - @devdazed\n* Matthias Eder - @matthiase\n* Christoph Tavan - @ctavan\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2011 SimpleReach \u0026lt;rbradberry@simplereach.com\u0026gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplereach%2Fhelenus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimplereach%2Fhelenus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplereach%2Fhelenus/lists"}