Actions and Querying

    Remember the you ran in the earlier document? Yup, that’s an action. All kind of quering in Skytable is done through actions. Actions are classified into two kinds:

    • DDL (Data definition language) Actions: These actions enable us to interact with the structures that store our data

    If you’re coming from a SQL background, you might be used to the DML way of things. That’s right, DML actions are similar. Let us try out a few basic DML actions (don’t worry — you’ll learn about DDL in the next few documents).

    The SET action lets us assign a key to a value (in a key/value table). For example:

    will assign the key x to 100. But how do we get it?

    GET

    The GET action lets us fetch keys. For example:

    The UPDATE action lets us update the values of keys. For example:

    will update the value of x to 200

    DEL

    The action lets us remove keys from the database. For example:

    1. DEL x

    will remove the key x from the database.

    Didn’t we just do a Create-Read-Update-Delete? The infamous CRUD! Now that you know some basic actions, you can take a look at the full index of actions.

    Types of queries

    Pipelined queries

    Pipelined queries or simply pipelines enable clients to send multiple queries to the database server at once. Responses for every query is returned in the order they query was sent. For example if you sent four queries like:

    Then you’d get the echos in the following order:

    1. "once"
    2. "twice"

    Hence, the responses are returned in the order queries were issued.

    Limitations

    Pipelines provide no transactional guarantees and hence shouldn’t be relied on for the same.

    Batches are currently in the decision phase but aim to provide a way to overcome the limitations imposed by pipelines, hence providing stronger guarantees. If you have any ideas, drop an issue here and we’ll be happy to consider it!