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 d8e915e0be Fix readyz/ path for check 3 years ago
..
README.md Update README.md 3 years ago
backup.go Restore request should re-read file every attempt 4 years ago
execute.go Display HTTP response body on 503 4 years ago
main.go Fix readyz/ path for check 3 years ago
query.go CLI supports setting read consistency level 3 years ago
remove_node.go Add support to CLI for node removal 5 years 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.

Build

go build -o rqlite

Usage

$> rqlite -h
Options:

  -h, --help
      display help

  -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

Example

$ ./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~