Skip to content

Commit 2c50a66

Browse files
committedApr 2, 2025
Add a few more examples of +versioned for SurrealKV
1 parent 5093ecc commit 2c50a66

File tree

6 files changed

+12
-5
lines changed

6 files changed

+12
-5
lines changed
 

‎src/content/doc-sdk-javascript/engines/node.mdx

+2
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ const db = new Surreal({
7979
await db.connect("mem://");
8080
// Or we can start a persisted SurrealKV database
8181
await db.connect("surrealkv://demo");
82+
// Or a persisted SurrealKV database with versioning (temoral queries)
83+
await db.connect("surrealkv+versioned://demo");
8284

8385
// Now use the JavaScript SDK as normal.
8486

‎src/content/doc-sdk-rust/frameworks/actix.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ surreal start --user root --pass root
2323

2424
You can also use the [Start serving](/docs/surrealist/concepts/local-database-serving) button on [Surrealist](/docs/surrealist) to do the same if you have it installed locally.
2525

26-
The database initiated by the [surreal start](/docs/surrealdb/cli/start) command stores data in memory by default, which then disappears every time the database is shut down. As such, you can simply use Ctrl+C every time you want to start the database anew with no existing definitions or data. To save data to disk which will persist after shutting down, add a [positional argument](/docs/surrealdb/cli/start#positional-argument) for one of the storage backends such as `rocksdb://mydatabase` or `surrealkv://mydatabase`.
26+
The database initiated by the [surreal start](/docs/surrealdb/cli/start) command stores data in memory by default, which then disappears every time the database is shut down. As such, you can simply use Ctrl+C every time you want to start the database anew with no existing definitions or data. To save data to disk which will persist after shutting down, add a [positional argument](/docs/surrealdb/cli/start#positional-argument) for one of the storage backends such as `rocksdb://mydatabase` or `surrealkv://mydatabase` (or `surrealkv+versioned//mydatabase` to include SurrealKV versioning).
2727

2828
With the database running, we will now connect to the database "test" located in the namespace "test". You can connect to it by [creating a connection](/docs/surrealist/getting-started#creating-a-connection) inside Surrealist, or by using the following command to start an interactive shell.
2929

‎src/content/doc-sdk-rust/frameworks/axum.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ surreal start --user root --pass root
2323

2424
You can also use the [Start serving](/docs/surrealist/concepts/local-database-serving) button on [Surrealist](/docs/surrealist) to do the same if you have it installed locally.
2525

26-
The database initiated by the [surreal start](/docs/surrealdb/cli/start) command stores data in memory by default, which then disappears every time the database is shut down. As such, you can simply use Ctrl+C every time you want to start the database anew with no existing definitions or data. To save data to disk which will persist after shutting down, add a [positional argument](/docs/surrealdb/cli/start#positional-argument) for one of the storage backends such as `rocksdb://mydatabase` or `surrealkv://mydatabase`.
26+
The database initiated by the [surreal start](/docs/surrealdb/cli/start) command stores data in memory by default, which then disappears every time the database is shut down. As such, you can simply use Ctrl+C every time you want to start the database anew with no existing definitions or data. To save data to disk which will persist after shutting down, add a [positional argument](/docs/surrealdb/cli/start#positional-argument) for one of the storage backends such as `rocksdb://mydatabase` or `surrealkv://mydatabase` (or `surrealkv+versioned//mydatabase` to include SurrealKV versioning).
2727

2828
With the database running, we will now connect to the database "test" located in the namespace "test". You can connect to it by [creating a connection](/docs/surrealist/getting-started#creating-a-connection) inside Surrealist, or by using the following command to start an interactive shell.
2929

‎src/content/doc-sdk-rust/frameworks/egui.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ surreal start --user root --pass root
1919

2020
You can also use the [Start serving](/docs/surrealist/concepts/local-database-serving) button on [Surrealist](/docs/surrealist) to do the same if you have it installed locally.
2121

22-
The database initiated by the [surreal start](/docs/surrealdb/cli/start) command stores data in memory by default, which then disappears every time the database is shut down. As such, you can simply use Ctrl+C every time you want to start the database anew with no existing definitions or data. To save data to disk which will persist after shutting down, add a [positional argument](/docs/surrealdb/cli/start#positional-argument) for one of the storage backends such as `rocksdb://mydatabase` or `surrealkv://mydatabase`.
22+
The database initiated by the [surreal start](/docs/surrealdb/cli/start) command stores data in memory by default, which then disappears every time the database is shut down. As such, you can simply use Ctrl+C every time you want to start the database anew with no existing definitions or data. To save data to disk which will persist after shutting down, add a [positional argument](/docs/surrealdb/cli/start#positional-argument) for one of the storage backends such as `rocksdb://mydatabase` or `surrealkv://mydatabase` (or `surrealkv+versioned//mydatabase` to include SurrealKV versioning).
2323

2424
With the database running, it's time to start setting up the Rust code.
2525

‎src/content/doc-sdk-rust/frameworks/rocket.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ surreal start --user root --pass root
2323

2424
You can also use the [Start serving](/docs/surrealist/concepts/local-database-serving) button on [Surrealist](/docs/surrealist) to do the same if you have it installed locally.
2525

26-
The database initiated by the [surreal start](/docs/surrealdb/cli/start) command stores data in memory by default, which then disappears every time the database is shut down. As such, you can simply use Ctrl+C every time you want to start the database anew with no existing definitions or data. To save data to disk which will persist after shutting down, add a [positional argument](/docs/surrealdb/cli/start#positional-argument) for one of the storage backends such as `rocksdb://mydatabase` or `surrealkv://mydatabase`.
26+
The database initiated by the [surreal start](/docs/surrealdb/cli/start) command stores data in memory by default, which then disappears every time the database is shut down. As such, you can simply use Ctrl+C every time you want to start the database anew with no existing definitions or data. To save data to disk which will persist after shutting down, add a [positional argument](/docs/surrealdb/cli/start#positional-argument) for one of the storage backends such as `rocksdb://mydatabase` or `surrealkv://mydatabase` (or `surrealkv+versioned//mydatabase` to include SurrealKV versioning).
2727

2828
With the database running, we will now connect to the database "test" located in the namespace "test". You can connect to it by [creating a connection](/docs/surrealist/getting-started#creating-a-connection) inside Surrealist, or by using the following command to start an interactive shell.
2929

‎src/content/doc-surrealdb/introduction/start.mdx

+6-1
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,8 @@ When starting SurrealDB through the command line, you can fully customize the da
450450
</a>
451451

452452
After you have installed SurrealDB, you can start the database using the [`surreal start`](/docs/surrealdb/cli/start) command provided by the [SurrealDB CLI](/docs/surrealdb/cli).
453-
When your start the database, you must specify which storage engine to use. This can be done by providing the engine as as the connection URL protocol. The following examples demonstrate how to start SurrealDB using different storage engines.
453+
454+
When you start the database, you must specify which storage engine to use. This can be done by providing the engine as as the connection URL protocol. The following examples demonstrate how to start SurrealDB using different storage engines.
454455

455456
<Tabs groupId="node-package-manager">
456457
<TabItem value="memory" label="In-Memory">
@@ -460,7 +461,11 @@ When your start the database, you must specify which storage engine to use. This
460461
</TabItem>
461462
<TabItem value="surrealkv" label="Single Node On-Disk SurrealKV" default>
462463
```bash
464+
# Without versioning (temporal queries)
463465
surreal start -u root -p root surrealkv://mydb
466+
467+
# With versioning
468+
surreal start -u root -p root surrealkv+versioned://mydb
464469
```
465470
</TabItem>
466471
<TabItem value="rocksdb" label="Single Node On-Disk rocksDB">

0 commit comments

Comments
 (0)