Supported SQL commands

NOTE: This is being updated for more supported features. This will be available with new command line tool coming shortly

The supported sql commands are listed below. However here are the high level key points

  • partial subset of ANSI SQL, with few changes/additions to simplify usage
  • single table operations - can have multiple tables in the sql statement
  • key words supported : select, insert, update, delete, select count(*), describe database, describe table, create table, open table, drop table, dump table - are supported
  • join and other operations are not supported
  • key, val are keywords for the query to denote key and value, key represents the key part and val represents the value part
  • all commands must begin and end in same line, that is press enter only when done with the command
  • semicolon (';') may or may not appear at the end of the command

select

	select * from 'mytable1'
	select * from 'mytable1' top 10;
	select * from 'mytable1' limit 10;
	select * from 'mytable1' where key < 'k'
	select * from 'mytable1' where key <= 'k' limit 10
	select * from 'mytable1' where key >= 'k' top 5;
	select * from 'mytable1' where key > 'k' and key <= 'k2'
	select * from 'mytable1' where key > 'k' and key < 'k2' limit 10;
	select count(*) from 'mytable1' where key > 'k'
	select count(*) from 'mytable1' where key > 'k' limit 15;
	select count(*) from 'mytable1' where key > 'k' top 20
	select count(*) from 'mytable1' where key >= 'k'
	select count(*) from 'mytable1' where key >= 'k' limit 10
	select count(*) from 'mytable1' where key >= 'k' top 200;
	etc...

insert

	insert into 'mytable1' values 'key1' 'value for key1';
	etc...

update

	update 'mytable1' set val = 'v' where key < 'k';
	update 'mytable1' set val = 'v' where key <= 'k';
	update 'mytable1' set val = 'v' where key > 'k'
	update 'mytable1' set val = 'v' where key >= 'k';
	update 'mytable1' set val = 'v' where key > 'k' and key < 'k2'
	update 'mytable1' set val = 'v' where key > 'k' and key <= 'k2';
	update 'mytable1' set val = 'v' where key >= 'k' and key < 'k2'
	update 'mytable1' set val = 'v' where key >= 'k' and key <= 'k2';
	update 'mytable1' set val = 'v' where key < 'k' or key > 'k2';
	update 'mytable1' set val = 'v' where key < 'k' or key >= 'k2';
	update 'mytable1' set val = 'v' where key <= 'k' or key > 'k2'
	update 'mytable1' set val = 'v' where key <= 'k' or key >= 'k2'
	etc...

delete

	delete from 'mytable1';
	delete from 'mytable1' where key < 'k'
	delete from 'mytable1' where key >= 'k'
	delete from 'mytable1' where key > 'k' and key < 'k2'
	delete from 'mytable1' where key >= 'k' and key <= 'k2'
	etc...