This is the multi-page printable view of this section. Click here to print.
Reference
Complete documentation about Genji’s SQL syntax
- 1: ALTER TABLE
- 2: CREATE INDEX
- 3: CREATE SEQUENCE
- 4: Transactions
- 5: CREATE TABLE
- 6: DELETE
- 7: DROP INDEX
- 8: DROP SEQUENCE
- 9: DROP TABLE
- 10: EXPLAIN
- 11: INSERT
- 12: REINDEX
- 13: SELECT
- 14: UPDATE
1 - ALTER TABLE
Manage tables and table constraints
Synopsis
ALTER TABLE statement
Field definition
Field constraint
2 - CREATE INDEX
Define a new index
Synopsis
CREATE INDEX statement
3 - CREATE SEQUENCE
Define a new sequence
Synopsis
CREATE SEQUENCE statement
4 - Transactions
Manage transactions
Synopsis
BEGIN TRANSACTION statement
ROLLBACK TRANSACTION statement
COMMIT TRANSACTION statement
5 - CREATE TABLE
Define a new table
Synopsis
CREATE TABLE statement
Parameters
IF NOT EXISTS
Do not throw an error if a table with the same name already exists.
table-name
The name of the table to be created.
Field definition
table-name
The name of the table to be created.
Field constraint
Table constraint
6 - DELETE
Delete documents
Synopsis
DELETE statement
7 - DROP INDEX
Delete an index and all of its content
Synopsis
DROP INDEX statement
8 - DROP SEQUENCE
Delete a sequence
Synopsis
DROP SEQUENCE statement
9 - DROP TABLE
Delete a table and all of its content
Synopsis
DROP TABLE statement
10 - EXPLAIN
Generate query plan
Synopsis
EXPLAIN statement
11 - INSERT
Insert documents
Synopsis
INSERT statement
VALUES clause
Conflict clause
RETURNING clause
12 - REINDEX
Reindex tables, indexes or everything
Synopsis
REINDEX statement
13 - SELECT
Query the database
Synopsis
SELECT statement
Result field
14 - UPDATE
Update documents
Synopsis
UPDATE statement