DDL
- CREATE to create containers
- to switch to containers and run actions in them
- INSPECT to inspect containers
- to delete containers
- Time complexity: O(1)
- Transactional: Not yet
Syntax:
Returns:
- Okay if the keyspace was created
- if it already existed
- server error if something unpredictable has happened on the server side
Tables
- Transactional: Not yet
Syntax:
CREATE TABLE <entity> <model>(modelargs) <properties>
Returns:
- Okay if the table was created
err-already-exists
if it already existeddefault-container-unset
if the connection level default keyspace has not been set- server error if something unpredictable has happened on the server side
- Refer to the to know what to pass for
<model>
andmodelargs
- Refer to the table properties section to know what to pass for
properties
- Refer to the to know what to pass for
entity
. It is simply yourtablename
oryourkeyspacename:yourtablename
Keyspaces
- Time complexity: O(1)
- Transactional: Not yet
Syntax:
Returns:
- Okay if the keyspace was deleted
container-not-found
if the keyspace wasn’t foundstill-in-use
if clients are still connected to the keyspace or the keyspace is not empty- server error if something unpredictable has happened on the server side
Transactional: Not yet
Syntax:
Returns:
container-not-found
if the keyspace wasn’t foundstill-in-use
if clients are still connected to the tabledefault-container-unset
if the connection level default keyspace has not been set- server error if something unpredictable has happened on the server side
- Refer to the to know what to pass for
entity
. It is simply yourtablename
oryourkeyspacename:yourtablename
Entire database
To inspect the entire database, run:
INSPECT KEYSPACES
This will return a flat array with all the keyspace names
Keyspaces
To inspect a keyspace, run:
To inspect a table, run:
This will return a string with the table’s syntactical description. For example, the keymap model can return:
Keymap { data: (binstr,binstr), volatile: true }
- Refer to the entity section to know what to pass for
entity
. It is simply yourtablename
oryourkeyspacename:yourtablename
Keyspaces
- Time complexity: O(1)
- Transactional: Not applicable
Syntax:
USE <keyspace_name>
Returns:
- Okay if the keyspace was switched
container-not-found
if the keyspace wasn’t found
Tables
Time complexity: O(1)
Transactional: Not applicable
Returns:
- Okay if the table was switched
container-not-found
if the keyspace wasn’t founddefault-container-unset
if the connection level default keyspace has not been set
- Refer to the to know what to pass for
entity
. It is simply your oryourkeyspacename:yourtablename