Skip to main content
Version: 0.7.0

Examples

DDL#

  1. Create a keymap table called 'cats' in a keyspace 'animals'. The cat's name will be the key which as an str value while the value would be the cat's image in a binary format, so it'll be of the binstr type.

    a. Let's create the keyspace

    CREATE KEYSPACE animals

    b. Let's create the table:

    CREATE TABLE animals:cat keymap(str,binstr)

    c. Let's switch to the table:

    USE animals:cat

    d. Let's inspect it:

    INSPECT TABLE animals:cat

    e. Let's drop the table:

    DROP TABLE animals:cat

    f. Let's drop the keyspace

    DROP KEYSPACE animals
  2. Create a keymap table called 'favorites' in the 'default' keyspace. This will store a favorite name, an str and an URL, also an str:

    CREATE TABLE favorites keymap(str,str)
  3. Create a keymap table called 'cache' in the 'default' keyspace that is volatile. Our cache key is an str while the value would be some binary data, so binstr:

    CREATE TABLE cache keymap(str,binstr) volatile