diff --git a/docs/config/_default/menus.toml b/docs/config/_default/menus.toml index 5b97307f1c3d..263d18118bd9 100644 --- a/docs/config/_default/menus.toml +++ b/docs/config/_default/menus.toml @@ -492,8 +492,48 @@ showSection = true [[preview]] - name = "Reference" + name = "YSQL" weight = 12 + identifier = "api-ysql" + url = "/preview/api/ysql/" + [preview.params] + showSection = true + +[[preview]] + name = "YCQL" + weight = 13 + identifier = "api-cassandra" + url = "/preview/api/ycql/" + [preview.params] + showSection = true + +[[preview]] + name = "Statements" + weight = 14 + parent = "api-cassandra" + identifier = "ycql-statements" + [preview.params] + showSection = true + +[[preview]] + name = "Data Types" + weight = 15 + parent = "api-cassandra" + identifier = "ycql-datatypes" + [preview.params] + showSection = true + +[[preview]] + name = "Functions & Expressions" + weight = 16 + parent = "api-cassandra" + identifier = "ycql-expressions" + [preview.params] + showSection = true + +[[preview]] + name = "Reference" + weight = 20 identifier = "reference" [preview.params] showSection = true @@ -505,7 +545,7 @@ [[preview]] name = "Contribute" - weight = 13 + weight = 30 identifier = "contribute" url = "/preview/contribute/" [preview.params] diff --git a/docs/content/preview/api/ycql/_index.md b/docs/content/preview/api/ycql/_index.md index 7f703401f92a..ba8774a7a488 100644 --- a/docs/content/preview/api/ycql/_index.md +++ b/docs/content/preview/api/ycql/_index.md @@ -6,13 +6,6 @@ description: YCQL is a semi-relational API that is best fit for internet-scale O summary: Reference for the YCQL API image: /images/section_icons/api/ycql.png headcontent: Cassandra-compatible API -menu: - preview: - parent: api - identifier: api-cassandra - weight: 10 - params: - classes: separator aliases: - /preview/api/ycql/ showRightNav: true diff --git a/docs/content/preview/api/ycql/batch.md b/docs/content/preview/api/ycql/batch.md index 2b2bea616287..84d19e44b353 100644 --- a/docs/content/preview/api/ycql/batch.md +++ b/docs/content/preview/api/ycql/batch.md @@ -6,7 +6,7 @@ summary: Execute multiple DML in 1 request description: Use batch to update multiple rows in 1 request. menu: preview: - parent: api-cassandra + parent: ycql-statements weight: 19991 type: docs --- diff --git a/docs/content/preview/api/ycql/ddl_alter_keyspace.md b/docs/content/preview/api/ycql/ddl_alter_keyspace.md index 5483ba9041eb..df3d9d884720 100644 --- a/docs/content/preview/api/ycql/ddl_alter_keyspace.md +++ b/docs/content/preview/api/ycql/ddl_alter_keyspace.md @@ -5,7 +5,7 @@ linkTitle: ALTER KEYSPACE description: Use the ALTER KEYSPACE statement to change the properties of an existing keyspace. menu: preview: - parent: api-cassandra + parent: ycql-statements weight: 1200 aliases: - /preview/api/cassandra/ddl_alter_keyspace diff --git a/docs/content/preview/api/ycql/ddl_alter_role.md b/docs/content/preview/api/ycql/ddl_alter_role.md index 32e75b1c78a8..0545de1d8530 100644 --- a/docs/content/preview/api/ycql/ddl_alter_role.md +++ b/docs/content/preview/api/ycql/ddl_alter_role.md @@ -5,7 +5,7 @@ linkTitle: ALTER ROLE description: Use the ALTER ROLE statement to change the properties of an existing role. menu: preview: - parent: api-cassandra + parent: ycql-statements weight: 1210 aliases: - /preview/api/cassandra/ddl_alter_role diff --git a/docs/content/preview/api/ycql/ddl_alter_table.md b/docs/content/preview/api/ycql/ddl_alter_table.md index 4cf5bebd4121..a702f867fbb7 100644 --- a/docs/content/preview/api/ycql/ddl_alter_table.md +++ b/docs/content/preview/api/ycql/ddl_alter_table.md @@ -5,7 +5,7 @@ linkTitle: ALTER TABLE description: Use the ALTER TABLE statement to change the schema or definition of an existing table. menu: preview: - parent: api-cassandra + parent: ycql-statements weight: 1220 aliases: - /preview/api/cassandra/ddl_alter_table diff --git a/docs/content/preview/api/ycql/ddl_create_index.md b/docs/content/preview/api/ycql/ddl_create_index.md index a2c3b7b2881a..622adf0af6f4 100644 --- a/docs/content/preview/api/ycql/ddl_create_index.md +++ b/docs/content/preview/api/ycql/ddl_create_index.md @@ -6,7 +6,7 @@ summary: Create a new index on a table description: Use the CREATE INDEX statement to create a new index on a table. menu: preview: - parent: api-cassandra + parent: ycql-statements weight: 1225 aliases: - /preview/api/ycql/ddl_create_index diff --git a/docs/content/preview/api/ycql/ddl_create_keyspace.md b/docs/content/preview/api/ycql/ddl_create_keyspace.md index 91a95b50fc8d..fab3a1464355 100644 --- a/docs/content/preview/api/ycql/ddl_create_keyspace.md +++ b/docs/content/preview/api/ycql/ddl_create_keyspace.md @@ -5,7 +5,7 @@ linkTitle: CREATE KEYSPACE description: Use the CREATE KEYSPACE statement to create a keyspace that functions as a grouping mechanism for database objects, such as tables or types. menu: preview: - parent: api-cassandra + parent: ycql-statements weight: 1230 aliases: - /preview/api/cassandra/ddl_create_keyspace diff --git a/docs/content/preview/api/ycql/ddl_create_role.md b/docs/content/preview/api/ycql/ddl_create_role.md index 74bb5ca8359b..00aab55dca38 100644 --- a/docs/content/preview/api/ycql/ddl_create_role.md +++ b/docs/content/preview/api/ycql/ddl_create_role.md @@ -5,7 +5,7 @@ linkTitle: CREATE ROLE description: Use the `CREATE ROLE` statement to create a new role that is used to authenticate into YCQL and as a group of permissions used to restrict operations on the database objects. menu: preview: - parent: api-cassandra + parent: ycql-statements weight: 1235 aliases: - /preview/api/cassandra/ddl_create_role diff --git a/docs/content/preview/api/ycql/ddl_create_table.md b/docs/content/preview/api/ycql/ddl_create_table.md index ee17a062388a..1547fbca606b 100644 --- a/docs/content/preview/api/ycql/ddl_create_table.md +++ b/docs/content/preview/api/ycql/ddl_create_table.md @@ -5,7 +5,7 @@ linkTitle: CREATE TABLE description: Use the CREATE TABLE statement to create a new table in a keyspace. menu: preview: - parent: api-cassandra + parent: ycql-statements weight: 1240 aliases: - /preview/api/ycql/ddl_create_table diff --git a/docs/content/preview/api/ycql/ddl_create_type.md b/docs/content/preview/api/ycql/ddl_create_type.md index e999fac06404..835f8e5f98c8 100644 --- a/docs/content/preview/api/ycql/ddl_create_type.md +++ b/docs/content/preview/api/ycql/ddl_create_type.md @@ -5,7 +5,7 @@ linkTitle: CREATE TYPE description: Use the CREATE TYPE statement to create a new user-defined data type in a keyspace. menu: preview: - parent: api-cassandra + parent: ycql-statements weight: 1250 aliases: - /preview/api/cassandra/ddl_create_type diff --git a/docs/content/preview/api/ycql/ddl_drop_index.md b/docs/content/preview/api/ycql/ddl_drop_index.md index 03ce2e76072f..c66d1a259c22 100644 --- a/docs/content/preview/api/ycql/ddl_drop_index.md +++ b/docs/content/preview/api/ycql/ddl_drop_index.md @@ -5,7 +5,7 @@ linkTitle: DROP INDEX description: Use the DROP INDEX statement to remove an index and all of its data from the database. menu: preview: - parent: api-cassandra + parent: ycql-statements weight: 1255 aliases: - /preview/api/cassandra/ddl_drop_index diff --git a/docs/content/preview/api/ycql/ddl_drop_keyspace.md b/docs/content/preview/api/ycql/ddl_drop_keyspace.md index c71b12a6996d..2f3acac5b36a 100644 --- a/docs/content/preview/api/ycql/ddl_drop_keyspace.md +++ b/docs/content/preview/api/ycql/ddl_drop_keyspace.md @@ -5,7 +5,7 @@ linkTitle: DROP KEYSPACE description: Use the DROP KEYSPACE statement to remove a keyspace from the system. menu: preview: - parent: api-cassandra + parent: ycql-statements weight: 1260 aliases: - /preview/api/cassandra/ddl_drop_keyspace diff --git a/docs/content/preview/api/ycql/ddl_drop_role.md b/docs/content/preview/api/ycql/ddl_drop_role.md index 8abd2e642812..de59a0363cbb 100644 --- a/docs/content/preview/api/ycql/ddl_drop_role.md +++ b/docs/content/preview/api/ycql/ddl_drop_role.md @@ -5,7 +5,7 @@ linkTitle: DROP ROLE description: Use the DROP ROLE statement to delete an existing role. menu: preview: - parent: api-cassandra + parent: ycql-statements weight: 1265 aliases: - /preview/api/cassandra/ddl_drop_role diff --git a/docs/content/preview/api/ycql/ddl_drop_table.md b/docs/content/preview/api/ycql/ddl_drop_table.md index e2280a132c1d..19a13003f420 100644 --- a/docs/content/preview/api/ycql/ddl_drop_table.md +++ b/docs/content/preview/api/ycql/ddl_drop_table.md @@ -5,7 +5,7 @@ linkTitle: DROP TABLE description: Use the DROP TABLE statement to remove a table and all of its data from the database. menu: preview: - parent: api-cassandra + parent: ycql-statements weight: 1270 aliases: - /preview/api/cassandra/ddl_drop_table diff --git a/docs/content/preview/api/ycql/ddl_drop_type.md b/docs/content/preview/api/ycql/ddl_drop_type.md index a394a733eb36..9a40a6d3f88d 100644 --- a/docs/content/preview/api/ycql/ddl_drop_type.md +++ b/docs/content/preview/api/ycql/ddl_drop_type.md @@ -5,7 +5,7 @@ linkTitle: DROP TYPE description: Use the DROP TYPE statement to remove an existing user-defined data type. menu: preview: - parent: api-cassandra + parent: ycql-statements weight: 1280 aliases: - /preview/api/cassandra/ddl_drop_type diff --git a/docs/content/preview/api/ycql/ddl_grant_permission.md b/docs/content/preview/api/ycql/ddl_grant_permission.md index 62a6bc28ca10..3bf64e13aaee 100644 --- a/docs/content/preview/api/ycql/ddl_grant_permission.md +++ b/docs/content/preview/api/ycql/ddl_grant_permission.md @@ -5,7 +5,7 @@ linkTitle: GRANT PERMISSION description: Use the GRANT PERMISSION statement to grant a permission (or all the available permissions) to a role. menu: preview: - parent: api-cassandra + parent: ycql-statements weight: 1281 aliases: - /preview/api/cassandra/ddl_grant_permission diff --git a/docs/content/preview/api/ycql/ddl_grant_role.md b/docs/content/preview/api/ycql/ddl_grant_role.md index 1a4e8aaaa322..656908d9f787 100644 --- a/docs/content/preview/api/ycql/ddl_grant_role.md +++ b/docs/content/preview/api/ycql/ddl_grant_role.md @@ -5,7 +5,7 @@ linkTitle: GRANT ROLE description: Use the GRANT ROLE statement to grant a role's permissions and SUPERUSER status to another role. menu: preview: - parent: api-cassandra + parent: ycql-statements weight: 1282 aliases: - /preview/api/cassandra/ddl_grant_role diff --git a/docs/content/preview/api/ycql/ddl_revoke_permission.md b/docs/content/preview/api/ycql/ddl_revoke_permission.md index 26e84538f00e..922ff6079179 100644 --- a/docs/content/preview/api/ycql/ddl_revoke_permission.md +++ b/docs/content/preview/api/ycql/ddl_revoke_permission.md @@ -5,7 +5,7 @@ linkTitle: REVOKE PERMISSION description: Use the REVOKE PERMISSION statement to revoke a permission (or all the granted permissions) from a role. menu: preview: - parent: api-cassandra + parent: ycql-statements weight: 1283 aliases: - /preview/api/cassandra/ddl_revoke_permission diff --git a/docs/content/preview/api/ycql/ddl_revoke_role.md b/docs/content/preview/api/ycql/ddl_revoke_role.md index 2079996aaf54..8f2d1af57b93 100644 --- a/docs/content/preview/api/ycql/ddl_revoke_role.md +++ b/docs/content/preview/api/ycql/ddl_revoke_role.md @@ -5,7 +5,7 @@ linkTitle: REVOKE ROLE description: Use the `REVOKE ROLE` statement to revoke a role (which represents a group of permissions and the SUPERUSER status) from another role. menu: preview: - parent: api-cassandra + parent: ycql-statements weight: 1284 aliases: - /preview/api/cassandra/ddl_revoke_role diff --git a/docs/content/preview/api/ycql/ddl_use.md b/docs/content/preview/api/ycql/ddl_use.md index 2cb6454b0388..0cd108c563bd 100644 --- a/docs/content/preview/api/ycql/ddl_use.md +++ b/docs/content/preview/api/ycql/ddl_use.md @@ -5,7 +5,7 @@ linkTitle: USE description: Use the USE statement to specify a default keyspace for the current client session. menu: preview: - parent: api-cassandra + parent: ycql-statements weight: 1290 aliases: - /preview/api/cassandra/ddl_use diff --git a/docs/content/preview/api/ycql/dml_delete.md b/docs/content/preview/api/ycql/dml_delete.md index 230dda01b48c..b7bd7f3e668e 100644 --- a/docs/content/preview/api/ycql/dml_delete.md +++ b/docs/content/preview/api/ycql/dml_delete.md @@ -5,7 +5,7 @@ linkTitle: DELETE description: Use the DELETE statement to remove rows from a specified table that meet a given condition. menu: preview: - parent: api-cassandra + parent: ycql-statements weight: 1330 aliases: - /preview/api/cassandra/ddl_delete diff --git a/docs/content/preview/api/ycql/dml_insert.md b/docs/content/preview/api/ycql/dml_insert.md index bf982408da90..19a83e526bf7 100644 --- a/docs/content/preview/api/ycql/dml_insert.md +++ b/docs/content/preview/api/ycql/dml_insert.md @@ -5,7 +5,7 @@ linkTitle: INSERT description: Use the INSERT statement to add a row to a specified table. menu: preview: - parent: api-cassandra + parent: ycql-statements weight: 1300 aliases: - /preview/api/cassandra/dml_insert diff --git a/docs/content/preview/api/ycql/dml_select.md b/docs/content/preview/api/ycql/dml_select.md index ef5b2d016224..7c92a11086ed 100644 --- a/docs/content/preview/api/ycql/dml_select.md +++ b/docs/content/preview/api/ycql/dml_select.md @@ -5,7 +5,7 @@ linkTitle: SELECT description: Use the SELECT statement to retrieve (part of) rows of specified columns that meet a given condition from a table. menu: preview: - parent: api-cassandra + parent: ycql-statements weight: 1310 aliases: - /preview/api/cassandra/dml_select diff --git a/docs/content/preview/api/ycql/dml_transaction.md b/docs/content/preview/api/ycql/dml_transaction.md index 912088fed4b9..b7de34ae053a 100644 --- a/docs/content/preview/api/ycql/dml_transaction.md +++ b/docs/content/preview/api/ycql/dml_transaction.md @@ -5,7 +5,7 @@ linkTitle: TRANSACTION description: Use the TRANSACTION statement block to make changes to multiple rows in one or more tables in a distributed ACID transaction. menu: preview: - parent: api-cassandra + parent: ycql-statements weight: 1330 aliases: - /preview/api/cassandra/dml_transaction diff --git a/docs/content/preview/api/ycql/dml_truncate.md b/docs/content/preview/api/ycql/dml_truncate.md index c102f8d62047..fb7f012d138c 100644 --- a/docs/content/preview/api/ycql/dml_truncate.md +++ b/docs/content/preview/api/ycql/dml_truncate.md @@ -5,7 +5,7 @@ linkTitle: TRUNCATE description: Use the TRUNCATE statement to remove all rows from a specified table. menu: preview: - parent: api-cassandra + parent: ycql-statements weight: 1330 aliases: - /preview/api/cassandra/dml_truncate diff --git a/docs/content/preview/api/ycql/dml_update.md b/docs/content/preview/api/ycql/dml_update.md index 9295388fd6a5..0afe3bc90492 100644 --- a/docs/content/preview/api/ycql/dml_update.md +++ b/docs/content/preview/api/ycql/dml_update.md @@ -5,7 +5,7 @@ linkTitle: UPDATE description: Use the UPDATE statement to update one or more column values for a row in table. menu: preview: - parent: api-cassandra + parent: ycql-statements weight: 1320 aliases: - /preview/api/cassandra/dml_update/ diff --git a/docs/content/preview/api/ycql/explain.md b/docs/content/preview/api/ycql/explain.md index eef3a578d9d4..5b3fbb4e00fc 100644 --- a/docs/content/preview/api/ycql/explain.md +++ b/docs/content/preview/api/ycql/explain.md @@ -5,7 +5,7 @@ linkTitle: EXPLAIN description: Use the EXPLAIN statement to show the execution plan for a YCQL statement. menu: preview: - parent: api-cassandra + parent: ycql-statements weight: 1320 aliases: - /preview/api/ycql/explain/ diff --git a/docs/content/preview/api/ycql/expr_fcall.md b/docs/content/preview/api/ycql/expr_fcall.md index 0dd2340bc55f..14ef7e12e559 100644 --- a/docs/content/preview/api/ycql/expr_fcall.md +++ b/docs/content/preview/api/ycql/expr_fcall.md @@ -5,7 +5,7 @@ linkTitle: Function call description: Use a function call expression to apply the specified function to given arguments between parentheses and return the result of the computation. menu: preview: - parent: api-cassandra + parent: ycql-expressions weight: 1350 aliases: - /preview/api/cassandra/expr_fcall diff --git a/docs/content/preview/api/ycql/expr_ocall.md b/docs/content/preview/api/ycql/expr_ocall.md index 64e140e05dc1..8ffa1c147296 100644 --- a/docs/content/preview/api/ycql/expr_ocall.md +++ b/docs/content/preview/api/ycql/expr_ocall.md @@ -5,7 +5,7 @@ linkTitle: Operators description: Combine multiple expressions using YCQL operators supported in YugabyteDB. menu: preview: - parent: api-cassandra + parent: ycql-expressions weight: 1360 aliases: - /preview/api/cassandra/expr_ocall diff --git a/docs/content/preview/api/ycql/expr_simple.md b/docs/content/preview/api/ycql/expr_simple.md index 2c781e2a77ff..78d3b81b4046 100644 --- a/docs/content/preview/api/ycql/expr_simple.md +++ b/docs/content/preview/api/ycql/expr_simple.md @@ -5,7 +5,7 @@ linkTitle: Simple expressions description: A simple expression can be a column, constant, or NULL. menu: preview: - parent: api-cassandra + parent: ycql-expressions weight: 1331 aliases: - /preview/api/cassandra/expr_simple diff --git a/docs/content/preview/api/ycql/expr_subscript.md b/docs/content/preview/api/ycql/expr_subscript.md index cc67777465da..210c52c1aacb 100644 --- a/docs/content/preview/api/ycql/expr_subscript.md +++ b/docs/content/preview/api/ycql/expr_subscript.md @@ -5,7 +5,7 @@ linkTitle: Subscripted expressions description: Use subscripted expressions to access elements in a multi-element value, such as a map collection by using the [] operator. menu: preview: - parent: api-cassandra + parent: ycql-expressions weight: 1340 aliases: - /preview/api/cassandra/expr_subscript diff --git a/docs/content/preview/api/ycql/function_datetime.md b/docs/content/preview/api/ycql/function_datetime.md index 01d0c7462292..58171de2ca7c 100644 --- a/docs/content/preview/api/ycql/function_datetime.md +++ b/docs/content/preview/api/ycql/function_datetime.md @@ -5,7 +5,7 @@ linkTitle: Date and time description: Use date and time functions to work on date and time data types. menu: preview: - parent: api-cassandra + parent: ycql-expressions weight: 1560 aliases: - /preview/api/cassandra/function_datetime diff --git a/docs/content/preview/api/ycql/type_blob.md b/docs/content/preview/api/ycql/type_blob.md index 5bc11e78bca9..030554a77629 100644 --- a/docs/content/preview/api/ycql/type_blob.md +++ b/docs/content/preview/api/ycql/type_blob.md @@ -5,7 +5,7 @@ linkTitle: BLOB description: Use the BLOB data type to represent arbitrary binary data of variable length. menu: preview: - parent: api-cassandra + parent: ycql-datatypes weight: 1370 aliases: - /preview/api/cassandra/type_blob diff --git a/docs/content/preview/api/ycql/type_bool.md b/docs/content/preview/api/ycql/type_bool.md index 4d19dc456b3b..04cd0ebc6a9d 100644 --- a/docs/content/preview/api/ycql/type_bool.md +++ b/docs/content/preview/api/ycql/type_bool.md @@ -5,7 +5,7 @@ linkTitle: BOOLEAN description: Use the `BOOLEAN` data type to specify values of either "true" or "false". menu: preview: - parent: api-cassandra + parent: ycql-datatypes weight: 1380 aliases: - /preview/api/cassandra/type_bool diff --git a/docs/content/preview/api/ycql/type_collection.md b/docs/content/preview/api/ycql/type_collection.md index 1649ac20f113..74798e688f70 100644 --- a/docs/content/preview/api/ycql/type_collection.md +++ b/docs/content/preview/api/ycql/type_collection.md @@ -5,7 +5,7 @@ linkTitle: Collection description: Use collection data types to specify columns for data objects that can contain more than one value. menu: preview: - parent: api-cassandra + parent: ycql-datatypes weight: 1390 aliases: - /preview/api/cassandra/type_collection diff --git a/docs/content/preview/api/ycql/type_datetime.md b/docs/content/preview/api/ycql/type_datetime.md index 4b6352e0ece8..d20e5789c8c0 100644 --- a/docs/content/preview/api/ycql/type_datetime.md +++ b/docs/content/preview/api/ycql/type_datetime.md @@ -5,7 +5,7 @@ linkTitle: DATE, TIME, and TIMESTAMP description: Use the date and time data types (DATE, TIME, and TIMESTAMP) to specify dates and time. menu: preview: - parent: api-cassandra + parent: ycql-datatypes weight: 1450 aliases: - /preview/api/cassandra/type_datetime diff --git a/docs/content/preview/api/ycql/type_frozen.md b/docs/content/preview/api/ycql/type_frozen.md index 57b36637da05..e28b58201477 100644 --- a/docs/content/preview/api/ycql/type_frozen.md +++ b/docs/content/preview/api/ycql/type_frozen.md @@ -5,7 +5,7 @@ linkTitle: FROZEN description: Use the FROZEN data type to specify columns of binary strings that result from serializing collections, tuples, or user-defined types. menu: preview: - parent: api-cassandra + parent: ycql-datatypes weight: 1401 aliases: - /preview/api/cassandra/type_frozen diff --git a/docs/content/preview/api/ycql/type_inet.md b/docs/content/preview/api/ycql/type_inet.md index ae64537efca2..d98e0c47f132 100644 --- a/docs/content/preview/api/ycql/type_inet.md +++ b/docs/content/preview/api/ycql/type_inet.md @@ -5,7 +5,7 @@ linkTitle: INET description: Use the INET data type to specify columns for data of IP addresses. menu: preview: - parent: api-cassandra + parent: ycql-datatypes weight: 1410 aliases: - /preview/api/cassandra/type_inet diff --git a/docs/content/preview/api/ycql/type_int.md b/docs/content/preview/api/ycql/type_int.md index b26b46739bbe..fcf6d600d974 100644 --- a/docs/content/preview/api/ycql/type_int.md +++ b/docs/content/preview/api/ycql/type_int.md @@ -5,7 +5,7 @@ linkTitle: Integer and counter description: There are several different data types for integers of different value ranges. Integers can be set, inserted, incremented, and decremented. menu: preview: - parent: api-cassandra + parent: ycql-datatypes weight: 1420 aliases: - /preview/api/cassandra/type_int diff --git a/docs/content/preview/api/ycql/type_jsonb.md b/docs/content/preview/api/ycql/type_jsonb.md index 5ea5ebbb7dfb..24b4c7ada46f 100644 --- a/docs/content/preview/api/ycql/type_jsonb.md +++ b/docs/content/preview/api/ycql/type_jsonb.md @@ -5,7 +5,7 @@ linkTitle: JSONB description: Use the JSONB data type to efficiently model json data. This data type makes it easy to model JSON data which does not have a set schema and might change often. menu: preview: - parent: api-cassandra + parent: ycql-datatypes weight: 1470 aliases: - /preview/api/ycql/type_jsonb diff --git a/docs/content/preview/api/ycql/type_number.md b/docs/content/preview/api/ycql/type_number.md index d82ae26ba84d..672f2f31ca85 100644 --- a/docs/content/preview/api/ycql/type_number.md +++ b/docs/content/preview/api/ycql/type_number.md @@ -5,7 +5,7 @@ linkTitle: Non-integer description: Use the non-integer (floating-point and fixed-point) data types to specify non-integer numbers. menu: preview: - parent: api-cassandra + parent: ycql-datatypes weight: 1430 aliases: - /preview/api/cassandra/type_number diff --git a/docs/content/preview/api/ycql/type_text.md b/docs/content/preview/api/ycql/type_text.md index 048082f0b021..7cf8e078b038 100644 --- a/docs/content/preview/api/ycql/type_text.md +++ b/docs/content/preview/api/ycql/type_text.md @@ -5,7 +5,7 @@ linkTitle: TEXT description: Use the TEXT data type to specify data of a string of Unicode characters. menu: preview: - parent: api-cassandra + parent: ycql-datatypes weight: 1440 aliases: - /preview/api/cassandra/type_text diff --git a/docs/content/preview/api/ycql/type_uuid.md b/docs/content/preview/api/ycql/type_uuid.md index 0735185c3ed3..065c563faed8 100644 --- a/docs/content/preview/api/ycql/type_uuid.md +++ b/docs/content/preview/api/ycql/type_uuid.md @@ -6,7 +6,7 @@ summary: UUID types description: Use the UUID data type to specify columns for data of universally unique ids. TIMEUUID is a universal unique identifier variant that includes time information. menu: preview: - parent: api-cassandra + parent: ycql-datatypes weight: 1460 aliases: - /preview/api/cassandra/type_uuid diff --git a/docs/content/preview/api/ysql/_index.md b/docs/content/preview/api/ysql/_index.md index 4621ffbc91c4..8cc9b493988f 100644 --- a/docs/content/preview/api/ysql/_index.md +++ b/docs/content/preview/api/ysql/_index.md @@ -5,11 +5,6 @@ linkTitle: YSQL description: Learn about Yugabyte Structured Query Language (YSQL), the distributed SQL API for the PostgreSQL compatible YugabyteDB database. summary: Reference for the YSQL API image: /images/section_icons/api/ysql.png -menu: - preview: - parent: api - identifier: api-ysql - weight: 10 aliases: - /preview/api/ysql/ type: indexpage diff --git a/docs/content/preview/api/ysql/datatypes/_index.md b/docs/content/preview/api/ysql/datatypes/_index.md index 36c56cc91c06..c8d431685257 100644 --- a/docs/content/preview/api/ysql/datatypes/_index.md +++ b/docs/content/preview/api/ysql/datatypes/_index.md @@ -9,7 +9,7 @@ menu: preview: identifier: api-ysql-datatypes parent: api-ysql - weight: 80 + weight: 10 aliases: - /preview/api/ysql/datatypes/ type: indexpage diff --git a/docs/content/preview/api/ysql/exprs/_index.md b/docs/content/preview/api/ysql/exprs/_index.md index e8062a4b47a4..360b8f02dcff 100644 --- a/docs/content/preview/api/ysql/exprs/_index.md +++ b/docs/content/preview/api/ysql/exprs/_index.md @@ -1,14 +1,14 @@ --- title: Built-in functions and operators [YSQL] headerTitle: Built-in functions and operators -linkTitle: Built-in functions and operators +linkTitle: Functions and operators description: YSQL supports all PostgreSQL-compatible built-in functions and operators. image: /images/section_icons/api/subsection.png menu: preview: identifier: api-ysql-exprs parent: api-ysql - weight: 60 + weight: 30 aliases: - /preview/api/ysql/exprs/ type: indexpage @@ -18,9 +18,7 @@ YSQL supports all PostgreSQL-compatible built-in functions and operators. The fo | Statement | Description | |-----------|-------------| -| [nextval()](func_nextval) | Returns the next value for the specified sequence in the current session | -| [currval()](func_currval) | Returns the value returned by the most recent call to _nextval()_ for the specified sequence in the current session | -| [lastval()](func_lastval) | Returns the value returned by the most recent call to _nextval()_ for _any_ sequence in the current session | +| [Sequence related functions](sequences) | Functions operating on sequences | | [yb_hash_code()](func_yb_hash_code) | Returns the partition hash code for a given set of expressions | | [Geo-partitioning helper functions](./geo_partitioning_helper_functions/) | Detailed list of geo-partitioning helper functions | | [JSON functions and operators](../datatypes/type_json/functions-operators/) | Detailed list of JSON-specific functions and operators | diff --git a/docs/content/preview/api/ysql/exprs/sequences/_index.md b/docs/content/preview/api/ysql/exprs/sequences/_index.md new file mode 100644 index 000000000000..aa007487e814 --- /dev/null +++ b/docs/content/preview/api/ysql/exprs/sequences/_index.md @@ -0,0 +1,22 @@ +--- +title: Functions related to sequences +headerTitle: Functions related to sequences +linkTitle: Sequence functions +description: Functions operting on sequences +image: /images/section_icons/api/subsection.png +menu: + preview: + identifier: api-ysql-sequences + parent: api-ysql-exprs + weight: 70 +type: indexpage +--- + +YSQL supports all PostgreSQL-compatible built-in functions and operators. The following are the currently documented ones. + +| Statement | Description | +|-----------|-------------| +| [nextval()](func_nextval) | Returns the next value for the specified sequence in the current session | +| [currval()](func_currval) | Returns the value returned by the most recent call to _nextval()_ for the specified sequence in the current session | +| [setval()](func_setval) | Set and return the value for for _any_ sequence| +| [lastval()](func_lastval) | Returns the value returned by the most recent call to _nextval()_ for _any_ sequence| \ No newline at end of file diff --git a/docs/content/preview/api/ysql/exprs/func_currval.md b/docs/content/preview/api/ysql/exprs/sequences/func_currval.md similarity index 97% rename from docs/content/preview/api/ysql/exprs/func_currval.md rename to docs/content/preview/api/ysql/exprs/sequences/func_currval.md index fe95a78f4f02..c0f7dd9ed7a9 100644 --- a/docs/content/preview/api/ysql/exprs/func_currval.md +++ b/docs/content/preview/api/ysql/exprs/sequences/func_currval.md @@ -6,7 +6,7 @@ description: Returns the last value returned by the nextval() function for the s menu: preview: identifier: api-ysql-exprs-currval - parent: api-ysql-exprs + parent: api-ysql-sequences aliases: - /preview/api/ysql/exprs/func_currval type: docs diff --git a/docs/content/preview/api/ysql/exprs/func_lastval.md b/docs/content/preview/api/ysql/exprs/sequences/func_lastval.md similarity index 97% rename from docs/content/preview/api/ysql/exprs/func_lastval.md rename to docs/content/preview/api/ysql/exprs/sequences/func_lastval.md index 15aa982ac0ae..1376937ad181 100644 --- a/docs/content/preview/api/ysql/exprs/func_lastval.md +++ b/docs/content/preview/api/ysql/exprs/sequences/func_lastval.md @@ -6,7 +6,7 @@ description: Returns the value returned from the last call to nextval(), for any menu: preview: identifier: api-ysql-exprs-lastval - parent: api-ysql-exprs + parent: api-ysql-sequences aliases: - /preview/api/ysql/exprs/func_lastval type: docs diff --git a/docs/content/preview/api/ysql/exprs/func_nextval.md b/docs/content/preview/api/ysql/exprs/sequences/func_nextval.md similarity index 99% rename from docs/content/preview/api/ysql/exprs/func_nextval.md rename to docs/content/preview/api/ysql/exprs/sequences/func_nextval.md index 0ad799b837af..87d2256c9034 100644 --- a/docs/content/preview/api/ysql/exprs/func_nextval.md +++ b/docs/content/preview/api/ysql/exprs/sequences/func_nextval.md @@ -6,7 +6,7 @@ description: Returns the next value from the sequence cache for the current sess menu: preview: identifier: api-ysql-exprs-nextval - parent: api-ysql-exprs + parent: api-ysql-sequences aliases: - /preview/api/ysql/exprs/func_nextval type: docs diff --git a/docs/content/preview/api/ysql/exprs/func_setval.md b/docs/content/preview/api/ysql/exprs/sequences/func_setval.md similarity index 98% rename from docs/content/preview/api/ysql/exprs/func_setval.md rename to docs/content/preview/api/ysql/exprs/sequences/func_setval.md index 1941e17fab12..93b679bbc2c8 100644 --- a/docs/content/preview/api/ysql/exprs/func_setval.md +++ b/docs/content/preview/api/ysql/exprs/sequences/func_setval.md @@ -6,7 +6,7 @@ description: Set and return the value for the specified sequence. menu: preview: identifier: api-ysql-exprs-setval - parent: api-ysql-exprs + parent: api-ysql-sequences type: docs --- diff --git a/docs/content/preview/api/ysql/name-resolution-in-top-level-sql.md b/docs/content/preview/api/ysql/name-resolution-in-top-level-sql.md index ecdd8630f518..5708155efb5d 100644 --- a/docs/content/preview/api/ysql/name-resolution-in-top-level-sql.md +++ b/docs/content/preview/api/ysql/name-resolution-in-top-level-sql.md @@ -6,7 +6,7 @@ description: Explains how unqualified identifiers, used within top-level SQL sta menu: preview: identifier: name-resolution-in-top-level-sql - parent: api-ysql + parent: the-sql-language weight: 40 type: docs --- @@ -87,7 +87,7 @@ execute qry; This is the result: ```output - search_path | row from pg_class + search_path | row from pg_class -------------+------------------- "my schema" | xyz_table ``` @@ -120,7 +120,7 @@ execute qry; This is the new result: ```output - search_path | row from pg_class + search_path | row from pg_class -------------+------------------- "" | xyz_table ``` @@ -141,7 +141,7 @@ execute qry; This is the new result: ```output - search_path | row from pg_class + search_path | row from pg_class -------------------------+----------------------------- "my schema", pg_catalog | xyz in "my schema".pg_class ``` @@ -165,7 +165,7 @@ execute qry; This is the new result: ```output - search_path | row from pg_class + search_path | row from pg_class -------------------------+------------------------- "my schema", pg_catalog | xyz in pg_temp.pg_class ``` @@ -184,7 +184,7 @@ Better still, ensure that the role as which client-side sessions connect doesn't This restores the earlier (and presumably intended) result: ```output - search_path | row from pg_class + search_path | row from pg_class ----------------------------------+----------------------------- "my schema", pg_catalog, pg_temp | xyz in "my schema".pg_class ``` @@ -244,7 +244,7 @@ execute qry; This is the result: ```output - 1 = 1 | 17 = 42 | 17 = 42 baroque syntax + 1 = 1 | 17 = 42 | 17 = 42 baroque syntax -------+---------+------------------------ false | true | false ``` @@ -259,7 +259,7 @@ execute qry; This is the result: ```output - 1 = 1 | 17 = 42 | 17 = 42 baroque syntax + 1 = 1 | 17 = 42 | 17 = 42 baroque syntax -------+---------+------------------------ true | false | false ``` @@ -278,7 +278,7 @@ The tests have shown that you cannot exclude either _pg_temp_ or _pg_catalog_ fr - If the definition of _search_path_ mentions neither _pg_temp_ nor _pg_catalog_, then the effective search order that name resolution uses is: - ```output + ```output pg_temp, [everything that the definition did mention, in that order], pg_catalog ``` @@ -318,7 +318,7 @@ select area(2.0, 3.0); This is the result: ```output - area + area ------ 6.00 ``` diff --git a/docs/content/preview/api/ysql/names-and-identifiers.md b/docs/content/preview/api/ysql/names-and-identifiers.md index 2fea1c06ca97..0d6d904ffbcc 100644 --- a/docs/content/preview/api/ysql/names-and-identifiers.md +++ b/docs/content/preview/api/ysql/names-and-identifiers.md @@ -6,7 +6,7 @@ description: Explains the difference between the terms of art 'name' and 'identi menu: preview: identifier: names-and-identifiers - parent: api-ysql + parent: the-sql-language weight: 30 type: docs --- @@ -51,7 +51,7 @@ The catalog tables list the _names_ of artifacts; SQL statements and PL/pgSQL so ```plpgsql \c yugabyte yugabyte set client_min_messages = error; - + do $body$ declare ten_ascii7_chars constant text not null := 'a123456789'; @@ -62,32 +62,32 @@ The catalog tables list the _names_ of artifacts; SQL statements and PL/pgSQL so ten_ascii7_chars|| ten_ascii7_chars|| ten_ascii7_chars; - + sixty_three_ascii7_chars constant text not null := substr(seventy_ascii7_chars, 1, 63); - + drop_role constant text not null := 'drop role if exists %I'; - + cr_role constant text not null := 'create role %I'; - + qry constant text not null := $$ select rolname from pg_roles where rolname ~'^%s'; $$; - + role_name text not null := ''; begin execute format(drop_role, seventy_ascii7_chars); execute format(cr_role, seventy_ascii7_chars); - + execute format(qry, ten_ascii7_chars) into strict role_name; - + assert length(sixty_three_ascii7_chars) = 63; assert role_name = sixty_three_ascii7_chars; - + execute format(drop_role, sixty_three_ascii7_chars); end; $body$; @@ -119,7 +119,7 @@ select This is the result: ```output - Test 1 | Test 2 | Test 3 + Test 1 | Test 2 | Test 3 --------+--------+------------- _123 | "1dog" | "dog$house" ``` @@ -161,7 +161,7 @@ select This is the result: ```output - Norwegian | French | Russian | Chinese + Norwegian | French | Russian | Chinese -----------+---------+----------+--------- "høyde" | "école" | "правда" | "速度" ``` @@ -186,7 +186,7 @@ Each _create table_ completes without error. This outcome might surprise you. In - Pictograms, in languages like Chinese, like `速` and `度` simply have no concept of case. - It gets even harder to understand the rules if identifiers are written using, say, Hebrew or Arabic script where the reading order is from right to left. -You can use the _quote_ident()_ function to implement a simple _boolean_ function to test if a name is a common name thus: +You can use the _quote_ident()_ function to implement a simple _boolean_ function to test if a name is a common name thus: ```plpgsql create function s.is_common(nam in text) @@ -205,7 +205,7 @@ select This is the result: ```output - is_common('_123') | is_common('1dog') + is_common('_123') | is_common('1dog') -------------------+------------------- true | false ``` @@ -278,7 +278,7 @@ The identifier for the object with the common name _my_table_ is written, in the Here's the query result: ```output - k | V + k | V ---+---- 1 | 17 2 | 42 @@ -309,7 +309,7 @@ Notice that the selected columns in the three catalog tables that the query join This is the output: ```output - SCHEMA_NAME | TABLE_NAME | COLUMN_NAME + SCHEMA_NAME | TABLE_NAME | COLUMN_NAME -------------+------------+------------- My Schema | my_table | V My Schema | my_table | k diff --git a/docs/content/preview/api/ysql/reserved_names.md b/docs/content/preview/api/ysql/reserved_names.md index f1a7700f190f..c82fa51fae3d 100644 --- a/docs/content/preview/api/ysql/reserved_names.md +++ b/docs/content/preview/api/ysql/reserved_names.md @@ -7,7 +7,7 @@ summary: List of reserved names menu: preview: identifier: api-ysql-reserved-names - parent: api-ysql + parent: the-sql-language weight: 100 aliases: - /preview/api/ysql/reserved_names diff --git a/docs/content/preview/api/ysql/the-sql-language/_index.md b/docs/content/preview/api/ysql/the-sql-language/_index.md index d80df9d01783..98b51b0dc084 100644 --- a/docs/content/preview/api/ysql/the-sql-language/_index.md +++ b/docs/content/preview/api/ysql/the-sql-language/_index.md @@ -1,14 +1,14 @@ --- title: The YugabyteDB SQL language [YSQL] headerTitle: The YugabyteDB SQL language -linkTitle: The SQL language +linkTitle: Language internals description: The YugabyteDB SQL language—DDL; DML; DCL; TCL; session and system control; performance control image: /images/section_icons/api/subsection.png menu: preview: identifier: the-sql-language parent: api-ysql - weight: 10 + weight: 100 aliases: - /preview/api/ysql/with-clause/ type: indexpage diff --git a/docs/content/preview/api/ysql/the-sql-language/statements/_index.md b/docs/content/preview/api/ysql/the-sql-language/statements/_index.md index 3fc43ec506ec..f2d684caeb21 100644 --- a/docs/content/preview/api/ysql/the-sql-language/statements/_index.md +++ b/docs/content/preview/api/ysql/the-sql-language/statements/_index.md @@ -1,14 +1,14 @@ --- title: SQL statements [YSQL] headerTitle: Categorized list of SQL statements -linkTitle: SQL statements +linkTitle: Statements description: List of PostgreSQL-compatible SQL statements supported by Yugabyte SQL (YSQL) image: /images/section_icons/api/subsection.png menu: preview: identifier: statements - parent: the-sql-language - weight: 100 + parent: api-ysql + weight: 5 aliases: - /preview/api/ysql/commands/ type: indexpage diff --git a/docs/content/preview/api/ysql/txn-model-for-top-level-sql.md b/docs/content/preview/api/ysql/txn-model-for-top-level-sql.md index 9181ba6e597d..ce91e6345205 100644 --- a/docs/content/preview/api/ysql/txn-model-for-top-level-sql.md +++ b/docs/content/preview/api/ysql/txn-model-for-top-level-sql.md @@ -6,12 +6,12 @@ description: Explains how top-level SQL statements are executed each in its own menu: preview: identifier: txn-model-for-top-level-sql - parent: api-ysql + parent: the-sql-language weight: 20 type: docs --- -This section describes how top-level SQL statements, sent to the PostgreSQL server using TCP/IP, execute. The same model, of course, applies for how YugabyteDB's YSQL subsystem executes such statements. The chapter [Frontend/Backend Protocol](https://www.postgresql.org/docs/11/protocol.html) in the PostgreSQL documentation describes how the server processes, and responds to, SQL statements that are sent this way. +This section describes how top-level SQL statements, sent to the PostgreSQL server using TCP/IP, execute. The same model, of course, applies for how YugabyteDB's YSQL subsystem executes such statements. The chapter [Frontend/Backend Protocol](https://www.postgresql.org/docs/11/protocol.html) in the PostgreSQL documentation describes how the server processes, and responds to, SQL statements that are sent this way. ## Client-side libraries and tools @@ -44,7 +44,7 @@ Notice that _commit_ (or _end_) and _rollback_ (or _abort_) are meaningful only ## Semantics of issuing non-transaction-control SQL statements during an ongoing transaction -The effects of ordinary non-transaction-control SQL statements that are issued during an ongoing transaction are essentially private to the current session and invisible to any other concurrent sessions. If the current session issues _rollback_, then from the point of view of other sessions, it's the same as if the current session had done nothing. Only if the current session issues _commit_ will the effects of its transaction become visible in other concurrent sessions. +The effects of ordinary non-transaction-control SQL statements that are issued during an ongoing transaction are essentially private to the current session and invisible to any other concurrent sessions. If the current session issues _rollback_, then from the point of view of other sessions, it's the same as if the current session had done nothing. Only if the current session issues _commit_ will the effects of its transaction become visible in other concurrent sessions. {{< tip title="See the dedicated YSQL documentation section on isolation levels." >}} The behavior of concurrent sessions, each of which has an ongoing transaction, needs very careful description—and it depends critically on which so-called _isolation level_ was specified when each transaction was started. See the section [Isolation levels](../../../explore/transactions/isolation-levels/). The isolation level of each session affects, for example: diff --git a/docs/content/preview/api/ysql/user-defined-subprograms-and-anon-blocks/_index.md b/docs/content/preview/api/ysql/user-defined-subprograms-and-anon-blocks/_index.md index 39371f48a0b0..692473c05251 100644 --- a/docs/content/preview/api/ysql/user-defined-subprograms-and-anon-blocks/_index.md +++ b/docs/content/preview/api/ysql/user-defined-subprograms-and-anon-blocks/_index.md @@ -1,7 +1,7 @@ --- title: User-defined subprograms and anonymous blocks [YSQL] headerTitle: User-defined subprograms and anonymous blocks—"language SQL" and "language plpgsql" -linkTitle: User-defined subprograms and anonymous blocks +linkTitle: Subprograms and anonymous blocks description: Describes how YSQL supports user-defined subprograms and anonymous blocks implemented in SQL and PL/pgSQL. image: /images/section_icons/api/subsection.png menu: diff --git a/docs/layouts/shortcodes/ebnf.html b/docs/layouts/shortcodes/ebnf.html index 9c7e4a333097..9d033d64162b 100644 --- a/docs/layouts/shortcodes/ebnf.html +++ b/docs/layouts/shortcodes/ebnf.html @@ -36,7 +36,8 @@ {{ $url = printf "%s&ts=%d" $url now.Unix }} {{ else }} {{/* set the ts value to the lastmod ts of the base ebnf file to use cache unless the file is changed */}} -{{ $f := os.Stat (printf "content/%s/api/%s/syntax_resources/%s_grammar.ebnf" $version $api $api) }} +{{$f := ""}} +{{ $f = os.Stat (printf "content/%s/api/%s/syntax_resources/%s_grammar.ebnf" $version $api $api) }} {{ $url = printf "%s&ts=%d" $url $f.ModTime.Unix }} {{ end }}