SQL Execution

blobcity>sql {ds}: {sql-query}

This request allows for execution of any SQL on the database. The SQL can be for data select, data insert, schema modification or any other SQL query based operation supported by BlobCity. The SQL query needs to be executed within the mentioned data store and the query structure needs to match the query grammar supported by BlobCity to prevent an error.

The {ds} parameter specifies the datastore inside which the SQL is to be executed. The the specified datastore should be present, and the logged in user should have access to the datastore and permission to run the specific query for the operation to succeed.

Depending on the query, the response will be shown in the simplest possibly human readable form. Any data returned by queries such as select queries are expected to be in JSON result set format, similar to the response giving by the corresponding REST web service counterpart.

blobcity>sql test: select * from `test`.`Collection1`

Above is an example query for select * from Collection1 which is placed inside datastore called test

blobcity>sql test: select * from `test`.`Collection1` where `col1` = 20

The above is an example of a query with a where clause on the same Collection1

blobcity>sql test: select `col1`,`col2` from `test`.`Collection1` where `col1` > 20

The above is an example query to select only col1 and col2 from the same Collection1