Home

Awesome

piladb Shell Client osw Build Status

piladb.sh is a set of utilities to interact with piladb from the command line or shell scripts. It aims to make simple interactions with a piladb server in an easy and fast way.

Requirements

Installation

source <(curl -s https://raw.githubusercontent.com/oscillatingworks/piladb-sh/master/piladb.sh)

Now type piladb_[TAB] and you will see a bunch of piladb related commands.

Usage

See piladb_help.

Tests

Run bash piladb_test.sh.

Examples

Start a local server, create a database and a stack, PUSH a random number, a string, a boolean, a JSON payload, and then stop the server:

#!/bin/bash

piladb_start

piladb_create_database MYDB
piladb_create_stack MYDB MYSTACK

piladb_PUSH MYDB MYSTACK $(( ( RANDOM % 10 )))
piladb_PUSH MYDB MYSTACK '"A string"'
piladb_PUSH MYDB MYSTACK true
piladb_PUSH MYDB MYSTACK '{"country":"ES"}'

piladb_POP MYDB MYSTACK

piladb_stop

Connect to a remote server, check status:

export PILADB_HOST=mypiladb.example.com

piladb_status

Download latest version of pilad and start server:

piladb_download
piladb_start

License

MIT