SQLite Cloud Shell
The official SQLite distribution comes with a powerful SQLite Command-Line Interface.
To compile the SQLite cli with the SQLite Cloud Bridge just follow these instructions:
- Install LibreSSL
- A build of the SQLite command-line interface requires three source files:
- sqlite3.c: The SQLite Bridge amalgamation source file
- sqlite3.h: The SQLite Bridge amalgamation header file
- shell.c: The command-line interface program from the SQLite amalgamation tarball
- To build the CLI, simply put these three files in the same directory and compile them together:
- if LibreSSL was installed in the
/usr/local/libressl
folder you can use the following command:
- if LibreSSL was installed in the
gcc shell.c sqlite3.c -I. -L/usr/local/libressl/lib/ -Wl,-rpath=/usr/local/libressl/lib/ -ltls -o sqlitecloud
Once the build is completed you can connect to any cloud database using a special connection string in the form: sqlitecloud://user:pass@host.com:port/dbname?timeout=10&key2=value2&key3=value3
Connection String
An easy way to obtain a valid connection string is to click on the node address in the Dashboard Nodes section. A valid connection string will be copied in your clipboard.
For example:
./sqlitecloud "sqlitecloud://<username>:<password>@<hostname>.sqlite.cloud:8860/<database-name>?create=1&sqlite=1"