
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@ridi/cql-builder
Advanced tools
Simple Cassandra CQL Builder in Javascript
$ npm install --save @ridi/cql-builder
import { Insert, Select, Update, Delete, CqlBuilderError } from '@ridi/cql-builder';
const result = Select().table('test_table', 'test_keyspace').build();
// Returns...
// result.query = 'SELECT * FROM test_keyspace.test_table'
// result.params = []
Generate insert query
const cql = Insert()
.table('test_table', 'test_keyspace')
.value('column1', 1)
.option('TTL', 86400)
.option('TIMESTAMP', 12345678)
.build();
// Returns...
// cql.query = 'INSERT INTO test_keyspace.test_table (column1) VALUES (?) USING TTL ? AND TIMESTAMP ?'
// cql.params = [1, 86400, 12345678]
Generate select query
const cql = Select()
.table('test_table', 'test_keyspace')
.field(['column1', 'column2'])
.field('column3')
.where('key1 = ?', 1000)
.where('key2 > ?', 2000)
.limit(5000)
.order('key1 DESC')
.where('key3 IN (?, ?)', 3000, 4000)
.option('TTL', 86400)
.filtering()
.build();
// Returns...
// cql.query = 'SELECT column1, column2, column3 FROM test_keyspace.test_table WHERE key1 = ? AND key2 > ? AND key3 IN (?, ?) ORDER BY key1 DESC LIMIT ? ALLOW FILTERING'
// cql.params = [1000, 2000, 3000, 4000, 5000]
Generate update query
const cql = Update()
.table('test_table')
.set('column1', 1)
.where('key1 = ?', 'a')
.option('TTL', 3000)
.upsert(true)
.build();
// Returns...
// cql.query = 'UPDATE test_table USING TTL ? SET column1 = ? WHERE key1 = ?'
// cql.params = [3000, 1, 'a']
Generate delete query
const cql = Delete()
.table('test_table')
.where('key1 = ?', 'a')
.field(['column1', 'column2'])
.option('TIMESTAMP', 12345678)
.build();
// Returns...
// cql.query = 'DELETE column1, column2 FROM test_table USING TIMESTAMP ? WHERE key1 = ?'
// cql.params = [12345678, 'a']
$ git clone git@github.com:ridi/cql-builder.git
$ cd cql-builder
$ npm install
Webpack build using Babel (Not required in development.)
$ npm run build
Tests using Jest
$ npm test
FAQs
Cassandra CQL Builder
We found that @ridi/cql-builder demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 12 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.