-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcqlsh.js
executable file
·29 lines (23 loc) · 910 Bytes
/
cqlsh.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env node
/*
* cqlsh node
* (c) 2018 QXIP BV
* See LICENSE for details
*/
//'use strict';
const program = require('commander');
const setConfig = require('./src/config').setConfig;
const cassandra = require('./src/cassandra');
const pkg = require('./package.json');
program
.version(pkg.version)
.usage('-e "SELECT ... limit 1" 127.0.0.1:9042')
.option('-e, --execute <string>', 'Execute the statement and quit', String)
.option('-k, --keyspace <string>', 'Authenticate to the given keyspace', String)
.option('-u, --username <string>', 'Authenticate as user', String)
.option('-p, --password <string>', 'Authenticate using password', String)
.option('-c, --cqlversion <string>', 'Specify a particular CQL version', String)
.option('-d, --debug <bool>', 'Debug Driver messages', Boolean)
.parse(process.argv)
//if (!program.execute) program.help();
cassandra.db(program);