1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Philip O'Toole a9c9a08b6a Don't stomp on outer error 8 months ago
..
history Filter, then dedupe 2 years ago
http [Draft] Accept alternative servers to connect to in rqlite cli (#947) 3 years ago
README.md Update README.md 3 years ago
backup.go rqlite CLI backs up and dumps using streaming 9 months ago
execute.go Bring go mod import path into compliance 9 months ago
main.go Fix rqlite shell help output 8 months ago
query.go Don't stomp on outer error 8 months ago
remove_node.go Use standard library to join host and port 9 months ago

README.md

rqlite

rqlite is a command line tool for connecting to a rqlited node. Consult the SQLite query language documentation for full details on the supported SQL syntax.

Usage

$> rqlite -h
Options:

  -h, --help
      display help information

  -a, --alternatives
      comma separated list of 'host:port' pairs to use as fallback

  -s, --scheme[=http]
      protocol scheme (http or https)

  -H, --host[=127.0.0.1]
      rqlited host address

  -p, --port[=4001]
      rqlited host port

  -P, --prefix[=/]
      rqlited HTTP URL prefix

  -i, --insecure[=false]
      do not verify rqlited HTTPS certificate

  -c, --ca-cert
      path to trusted X.509 root CA certificate

  -u, --user
      set basic auth credentials in form username:password

  -v, --version
      display CLI version

Example

Connecting to a host running locally:

$ rqlite
127.0.0.1:4001> CREATE TABLE foo (id INTEGER NOT NULL PRIMARY KEY, name TEXT)
0 row affected (0.000362 sec)
127.0.0.1:4001> .tables
+------+
| name |
+------+
| foo  |
+------+
127.0.0.1:4001> .schema
+---------------------------------------------------------------+
| sql                                                           |
+---------------------------------------------------------------+
| CREATE TABLE foo (id INTEGER NOT NULL PRIMARY KEY, name TEXT) |
+---------------------------------------------------------------+
127.0.0.1:4001> INSERT INTO foo(name) VALUES("fiona")
1 row affected (0.000117 sec)
127.0.0.1:4001> SELECT * FROM foo
+----+-------+
| id | name  |
+----+-------+
| 1  | fiona |
+----+-------+
127.0.0.1:4001> quit
bye~

Connecting to a host running somewhere else on the network:

$ rqlite -H localhost -p 8493
locahost:8493>

Build

go build -o rqlite