From 4977f52191d7196ab5b3f46e0c95f97b4d1b2d49 Mon Sep 17 00:00:00 2001 From: Richard Chien Date: Thu, 12 Dec 2024 14:52:41 +0800 Subject: [PATCH 1/3] add hyperlinks for sql commands Signed-off-by: Richard Chien --- processing/sql/transactions.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/processing/sql/transactions.mdx b/processing/sql/transactions.mdx index 36df6a63..ab8a1449 100644 --- a/processing/sql/transactions.mdx +++ b/processing/sql/transactions.mdx @@ -8,7 +8,7 @@ Transactions in databases refer to logical units of work that consist of one or RisingWave supports read-only transactions, where all reads within a transaction are executed against the consistent Hummock snapshot. Hummock is the LSM-Tree-based storage engine in RisingWave that is specifically optimized for streaming workloads. -To initiate a transaction, use either the `START TRANSACTION READ ONLY` or `BEGIN READ ONLY` command. Subsequently, you can execute queries to read data from the consistent snapshot. To finalize the transaction and submit the queries as a single unit, use the `COMMIT` command. +To initiate a transaction, use either the [`START TRANSACTION READ ONLY`](/sql/commands/sql-start-transaction) or [`BEGIN READ ONLY`](/sql/commands/sql-begin) command. Subsequently, you can execute queries to read data from the consistent snapshot. To finalize the transaction and submit the queries as a single unit, use the [`COMMIT`](/sql/commands/sql-commit) command. Please note that data modifications are not allowed while a transaction is initiated but not yet committed. The statements listed below are not allowed within a transaction: From e6a625d719651bed45610dfee26211ced807c986 Mon Sep 17 00:00:00 2001 From: Richard Chien Date: Thu, 12 Dec 2024 14:58:17 +0800 Subject: [PATCH 2/3] move `transactions` out of `sql patterns` Signed-off-by: Richard Chien --- mint.json | 4 ++-- processing/sql/sql-references.mdx | 2 +- processing/{sql => }/transactions.mdx | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename processing/{sql => }/transactions.mdx (100%) diff --git a/mint.json b/mint.json index fd00dae0..6af7bb9c 100644 --- a/mint.json +++ b/mint.json @@ -424,18 +424,18 @@ "pages": [ "processing/overview", { - "group": "SQL", + "group": "SQL patterns", "pages": [ "processing/sql/dynamic-filters", "processing/sql/temporal-filters", "processing/sql/joins", "processing/sql/time-windows", "processing/sql/top-n-by-group", - "processing/sql/transactions", "processing/sql/sql-references" ] }, "processing/deletes-and-updates", + "processing/transactions", "processing/maintain-wide-table-with-table-sinks", "processing/watermarks", "processing/emit-on-window-close", diff --git a/processing/sql/sql-references.mdx b/processing/sql/sql-references.mdx index 72fcd396..b65f5dd4 100644 --- a/processing/sql/sql-references.mdx +++ b/processing/sql/sql-references.mdx @@ -1,4 +1,4 @@ --- -title: SQL references +title: Full SQL references url: /sql/overview --- \ No newline at end of file diff --git a/processing/sql/transactions.mdx b/processing/transactions.mdx similarity index 100% rename from processing/sql/transactions.mdx rename to processing/transactions.mdx From 0160530c83974a50fe53b3d99f49d9b9f45d994f Mon Sep 17 00:00:00 2001 From: Richard Chien Date: Thu, 12 Dec 2024 15:01:13 +0800 Subject: [PATCH 3/3] fix broken links Signed-off-by: Richard Chien --- sql/commands/sql-begin.mdx | 4 ++-- sql/commands/sql-commit.mdx | 4 ++-- sql/commands/sql-start-transaction.mdx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sql/commands/sql-begin.mdx b/sql/commands/sql-begin.mdx index bdbd2137..bc619682 100644 --- a/sql/commands/sql-begin.mdx +++ b/sql/commands/sql-begin.mdx @@ -3,7 +3,7 @@ title: "BEGIN" description: "RisingWave supports read-only transactions. You can use the `BEGIN READ ONLY` command to start a read-only transaction." --- -For more information about transactions in RisingWave, see [Transactions](/processing/sql/transactions). +For more information about transactions in RisingWave, see [Transactions](/processing/transactions). The `BEGIN` command starts the read-write transaction mode, which is not supported yet in RisingWave. For compatibility reasons, this command will still succeed but no transaction is actually started. That is why you need to specify the `READ ONLY` option to start a transaction in read-only mode. @@ -23,7 +23,7 @@ BEGIN ## Related topics - diff --git a/sql/commands/sql-commit.mdx b/sql/commands/sql-commit.mdx index d17cd774..f36c6559 100644 --- a/sql/commands/sql-commit.mdx +++ b/sql/commands/sql-commit.mdx @@ -3,7 +3,7 @@ title: "COMMIT" description: "RisingWave supports read-only transactions. You can use the `COMMIT` command to commit the current transaction." --- -For more information about transactions in RisingWave, see [Transactions](/processing/sql/transactions). +For more information about transactions in RisingWave, see [Transactions](/processing/transactions). You can start a read-only transaction by using the `BEGIN READ ONLY` or `START TRANSACTION READ ONLY` command. @@ -28,7 +28,7 @@ COMMIT title="Transactions" icon="rotate" iconType="solid" - href="/processing/sql/transactions" + href="/processing/transactions" horizontal />