This page explains how to create a table in QWAZR.
- URL: http://{server_name}:9091/table/{table_name}
- Path parameters:
- server_name: the name of the server
- table_name: the name of the table
- HTTP Method: POST
- HTTP Headers:
- Content-Type: application/json
The body is a JSON object with a set of column descriptions.
Each item of the columns element describes a column of the table:
{
"columns": {
"{column_name}": {
"type": "{column_type}",
"mode": "{column_mode}"
}
}
Example of body:
{
"columns": {
"category": { "type": "STRING", "mode": "INDEXED" },
"title": {"type": "STRING", "mode": "STORED" },
"price": {"type": "DOUBLE", "mode": "STORED" }
}
}
- STRING: UTF-8 characters
- DOUBLE: 64-bit IEEE 754 floating point
- LONG: 64-bit two's complement integer
The column mode defines if the value are indexed or stored:
- STORED: The value is only stored, the column cannot be used in a query.
- INDEXED: The content is stored and indexed. The column can be used in a query.
TO DO
TO DO