Automata, Languages and Compilers course project
- Python 2.7+
- Clone this repo:
$ git clone [email protected]:tsudmi/json-database.git
- Create virtualenv:
$ cd json-database
$ virtualenv venv
- Install JSON Database in development mode:
$ venv/bin/python setup.py develop
- Run database commands with --c parameter directly:
$ venv/bin/json-database --c 'SELECT * FROM Person'
- Run database command from prompt:
$ venv/bin/json-database
Command: 'SELECT * FROM Person'
- Specify database path:
$ venv/bin/json-database --d /path/to/the/database.json
- Run database commands with provided script path:
$ venv/bin/json-database --f /path/to/the/file
-- This is example!
CREATE TABLE Person;
INSERT INTO Person SET Name="John", age=25, married=true;
UPDATE Person SET age=28 WHERE Name="John";
SELECT * FROM Person
DELETE FROM Person WHERE Name="Carl";
DELETE FROM Person;
DROP TABLE Person