Lindorm provides Data Definition Language (DDL) commands to define and manage database objects such as databases, tables, and indexes.
The following table lists the supported DDL commands, the required permissions, and the supported permission granularities.
The ALL or ALL PRIVILEGES permission includes the READ, WRITE, ADMIN, and TRASH permissions. Granting ALL also grants these four permissions.
The following table lists only permissions other than ALL.
|
Category |
Command |
Description |
Permissions |
Permission granularity |
|
Database and table schema query |
Returns the schema of a table or database. |
READ |
|
|
|
Database management |
Switches to a different database. |
|
|
|
|
Creates a database and sets its properties. |
ADMIN |
GLOBAL |
||
|
Modifies the properties of a database. |
ADMIN |
GLOBAL |
||
|
Deletes a specified database. |
Requires the READ and ADMIN permissions. |
GLOBAL |
||
|
Lists all databases in the current instance. |
|
|
||
|
Table management |
Creates a table and sets its properties. |
ADMIN |
|
|
|
Creates a new table with the same structure as an existing table. |
Requires the READ and ADMIN permissions. |
DATABASE |
||
|
Modifies the structure of a table, such as adding or dropping columns, changing data types, or setting table properties. |
Requires the READ and ADMIN permissions. |
DATABASE |
||
|
Deletes a specified table. |
Requires the ADMIN and TRASH permissions. |
DATABASE |
||
|
Removes all data from a table while preserving the table structure and indexes. |
Requires the ADMIN and TRASH permissions. |
DATABASE |
||
|
Lists tables in a database that match specified conditions. |
|
|
||
|
Returns the CREATE TABLE statement of a specified table. |
Requires the READ and ADMIN permissions. |
DATABASE |
||
|
Takes a table offline. An offline table cannot be read from or written to. |
ADMIN |
|
||
|
Brings a table back online. An online table can be read from and written to. |
ADMIN |
|
||
|
Index management |
Creates a secondary index, search index, or columnstore index and sets its properties. |
Requires the READ and ADMIN permissions. |
DATABASE |
|
|
Changes the status of an index or adds columns to an index. |
Requires the READ and ADMIN permissions. |
DATABASE |
||
|
Builds a secondary index. For LindormTable versions later than 2.2.16 and up to 2.6.3, you must run this command to build the secondary index after creating the index. |
Requires the READ and ADMIN permissions. |
DATABASE |
||
|
Deletes a specified index. |
Requires the READ, ADMIN, and TRASH permissions. |
DATABASE |
||
|
Displays index information for a specified table, such as index type and build progress. |
Requires the READ and ADMIN permissions. |
DATABASE |
||
|
System property modification |
Modifies dynamic configuration parameters, such as the file version number or the slow query view. |
ADMIN |
GLOBAL |
|
|
System and table property view |
Displays system properties or the properties of a specific table. |
READ |
GLOBAL |
|
|
SQL query process management |
Lists currently running SQL statements and their execution details. |
|
|
|
|
Terminates a running SQL statement. |
|
|