Overview
In this document we explore some of the meta parts of BlueQL. If you want to look at how you can use BlueQL, consider looking at the sections that follow.
Design principles:
- Simplicity and clarity: The language shouldn't be overwhelming to understand
- Security with mandatory parameterization: We want to reduce the surface of injection attacks. For this reason, parameterization is mandatory.
Just like SQL, BlueQL has three categories of commands/queries inside it:
- DDL: Data definition language is used to define, modify and/or remove DDL objects such as
spaces andmodels - DCL: Data control language is used to control the access to data, and perform other administrative tasks
- DML: Data manipulation language is used to manipulate data
Jump to differences from SQL.
This text is not a detailed, formal guide. It's meant for developers and users who want to work with Skytable. If you need a more formal specification, like a grammar definition, please ask us, and we'll create it. We haven't published it yet because no one has requested it.
Identifiers
Can begin with any ASCII alphabet or an underscore (_) and then have any number of alphanumeric characters and/or underscores.
Keywords
Keywords are identifiers with special meanings and hence can't be used as identifiers in other places. Here's a full-list of keywords:
[
"sysctl", "create", "alter", "drop", "use", "inspect", "describe", "insert", "select", "update",
"delete", "exists", "table", "model", "space", "index", "type", "function", "rename", "add",
"remove", "transform", "set", "return", "order", "sort", "group", "limit", "asc", "desc", "all",
"by", "with", "on", "from", "into", "as", "to", "in", "of", "and", "or", "not", "if", "else",
"where", "when", "allow", "auto", "default", "null", "transaction", "batch", "lock", "read",
"write", "begin", "end", "key", "value", "primary", "truncate"
]
Data types
Boolean
A boolean value, either true or false
Unsigned integers
uint8: unsigned 8-bit integeruint16: unsigned 16-bit integeruint32: unsigned 32-bit integeruint64: unsigned 64-bit integer
Signed integers
sint8: signed 8-bit integersint16: signed 16-bit integersint32: signed 32-bit integersint64: signed 64-bit integer
Floating point values
float32: a single-precision floatfloat64: a double-precision float
Simple collections
binary: a binary blob represented as a sequence ofuint8valuesstring: an UTF-8 string