diff --git a/src/content/docs/client-apis/cli.mdx b/src/content/docs/client-apis/cli.mdx
index a937e16..1ca2eea 100644
--- a/src/content/docs/client-apis/cli.mdx
+++ b/src/content/docs/client-apis/cli.mdx
@@ -19,10 +19,10 @@ data is persisted to disk after the CLI shell is closed. Note that if the databa
directory does not exist, it will be created for you.
```bash
-$ lbug example.lbug
+$ lbug example.lbdb
```
```
-Opened the database example.lbug in read-write mode.
+Opened the database example.lbdb in read-write mode.
Enter ":help" for usage hints.
lbug>
```
@@ -199,10 +199,10 @@ COPY Person FROM 'person.csv';
Pipe the file content to the CLI as follows:
```bash
-lbug example.lbug < schema.cypher
+lbug example.lbdb < schema.cypher
```
``` table
-Opened the database example.lbug in read-write mode.
+Opened the database example.lbdb in read-write mode.
Enter ":help" for usage hints.
┌────────────────────────────────┐
│ result │
diff --git a/src/content/docs/client-apis/nodejs.mdx b/src/content/docs/client-apis/nodejs.mdx
index 7b34d2b..683d922 100644
--- a/src/content/docs/client-apis/nodejs.mdx
+++ b/src/content/docs/client-apis/nodejs.mdx
@@ -29,7 +29,7 @@ const lbug = require("@ladybugdb/core");
(async () => {
// Create an empty on-disk database and connect to it
- const db = new lbug.Database("example.lbug");
+ const db = new lbug.Database("example.lbdb");
const conn = new lbug.Connection(db);
// Create the tables
@@ -68,7 +68,7 @@ where async operations are not desired.
const lbug = require("@ladybugdb/core");
// Create an empty on-disk database and connect to it
-const db = new lbug.Database("example.lbug");
+const db = new lbug.Database("example.lbdb");
const conn = new lbug.Connection(db);
// Create the tables
diff --git a/src/content/docs/client-apis/python.mdx b/src/content/docs/client-apis/python.mdx
index 3032727..54785f2 100644
--- a/src/content/docs/client-apis/python.mdx
+++ b/src/content/docs/client-apis/python.mdx
@@ -39,7 +39,7 @@ import ladybug as lb
def main() -> None:
# Create an empty on-disk database and connect to it
- db = lb.Database("example.lbug")
+ db = lb.Database("example.lbdb")
conn = lb.Connection(db)
create_tables(conn)
@@ -83,7 +83,7 @@ import ladybug as lb
async def main():
# Create an empty on-disk database and connect to it
- db = lb.Database("example.lbug")
+ db = lb.Database("example.lbdb")
# The underlying connection pool will be automatically created and managed by the async connection
conn = lb.AsyncConnection(db, max_concurrent_queries=4)
diff --git a/src/content/docs/concurrency.md b/src/content/docs/concurrency.md
index 70d473b..7125eb9 100644
--- a/src/content/docs/concurrency.md
+++ b/src/content/docs/concurrency.md
@@ -18,14 +18,14 @@ local database, whereas under [in-memory](/get-started#in-memory-database) mode,
no data is persisted to disk.
Throughout this documentation, let's suppose you open a Ladybug database file that's on-disk, named
-`example.lbug`.
+`example.lbdb`.
## Understand connections
### Database and connection objects
Application processes must connect to a Ladybug database in two steps before they can start querying it:
-**Step 1.** Create an instance of a `Database` object `db` and pass it the database filename (`example.lbug` in our example below), and
+**Step 1.** Create an instance of a `Database` object `db` and pass it the database filename (`example.lbdb` in our example below), and
a read-write mode which can be either:
1. `READ_WRITE` (default); or
2. `READ_ONLY`
@@ -38,7 +38,7 @@ do both read (e.g., queries with `MATCH WHERE RETURN` statements) as well as wri
- In contrast, a Connection object that was created using a `READ_ONLY` database can only execute
queries that do read operations.
-Then, using `conn`, one can execute Cypher queries against the `example.lbug` database.
+Then, using `conn`, one can execute Cypher queries against the `example.lbdb` database.
Here's a simple example application in Python that demonstrates these two steps for creating a `READ_WRITE`
database and a connection. The same principles apply to other language APIs as well:
@@ -46,8 +46,8 @@ database and a connection. The same principles apply to other language APIs as w
import ladybug as lb
# Open the database in `READ_WRITE` mode. The below code is equivalent to:
-# db = lb.Database("example.lbug", read_only=False)
-db = lb.Database("example.lbug")
+# db = lb.Database("example.lbdb", read_only=False)
+db = lb.Database("example.lbdb")
conn = lb.Connection(db)
conn.execute("CREATE (a:Person {name: 'Alice'});")
```
@@ -97,13 +97,13 @@ in that process).
However, there are common scenarios when you may want to launch
multiple application processes that connect to the same database. One such scenario
is when developing your workflow in Python using a Jupyter notebook
-that connects to `example.lbug`. Say you want to also run the Ladybug CLI alongside your Jupyter notebook,
-which also connects to the same `example.lbug`. When you launch Ladybug CLI and point it to
-`example.lbug`, Ladybug CLI embeds Ladybug and tries to create a `READ_WRITE` Database object. So if your notebook process already
+that connects to `example.lbdb`. Say you want to also run the Ladybug CLI alongside your Jupyter notebook,
+which also connects to the same `example.lbdb`. When you launch Ladybug CLI and point it to
+`example.lbdb`, Ladybug CLI embeds Ladybug and tries to create a `READ_WRITE` Database object. So if your notebook process already
has created a Database object, this will fail with an error that looks like this:
```console
-RuntimeError: IO exception: Could not set lock on file : /path/to/database/example.lbug
+RuntimeError: IO exception: Could not set lock on file : /path/to/database/example.lbdb
```
If this happens, you would have to shut down your notebook process (or simply restart your Jupyter server),
@@ -113,12 +113,12 @@ so that its Database object is destroyed, before the CLI can run.
Note that the above limitation about creating multiple Database objects does not mean that you cannot create
multiple Connections from the same `READ_WRITE` Database object and issue concurrent queries. For example,
-you can write a program that creates a single `READ_WRITE` Database object `db` that points to `example.lbug`.
+you can write a program that creates a single `READ_WRITE` Database object `db` that points to `example.lbdb`.
Then, you can spawn multiple threads
T1, ..., Tk, and each Ti obtains a connection from `db` and concurrently issues
read or write queries. This is safe. Every read and write statement in Ladybug is wrapped around a transaction
(either automatically or manually by you). Concurrent transactions that operate on the same database
-`example.lbug` are safely executed by Ladybug's transaction manager (i.e., the transaction manager inside `db`),
+`example.lbdb` are safely executed by Ladybug's transaction manager (i.e., the transaction manager inside `db`),
again as long as those transactions are issued by connections that were created from the same Database object.
See the documentation on [transactions](/cypher/transaction) for the transactional guarantees that Ladybug provides.
@@ -128,7 +128,7 @@ Below, we provide some examples and best practices for common scenarios you are
### Scenario 1: One process that creates a `READ_WRITE` database
In this scenario, you have a single application process that embeds Ladybug and creates a `READ_WRITE` Database object
-that opens the `example.lbug` database. Within this process, you can create multiple concurrent connections, each of which
+that opens the `example.lbdb` database. Within this process, you can create multiple concurrent connections, each of which
can execute queries that can read and write to the database, which will be handled safely
by Ladybug's transaction manager. Pictorially, this scenario looks as follows:
@@ -139,7 +139,7 @@ from `conn1` and `conn2` are executed sequentially but they could be running con
### Scenario 2: Multiple processes that create `READ_ONLY` databases
In this scenario, you have multiple application processes that embed
-Ladybug and create `READ_ONLY` Database objects that open the same database `example.lbug`.
+Ladybug and create `READ_ONLY` Database objects that open the same database `example.lbdb`.
Each process can create multiple concurrent connections and issue queries.
However, each connection can only execute read-only queries (because the database is opened in `READ_ONLY` mode).
Since the connections and queries are read-only, none of the queries can change the actual database files on disk.
@@ -152,12 +152,12 @@ If you're interested in running multiple processes that can read and write to th
### Performing read-write operations from multiple processes
In certain production settings, you may need to have multiple processes that read and write to the same Ladybug database,
-say again stored under `example.lbug`.
+say again stored under `example.lbdb`.
This is the case for example if you have an online application. Say you have a browser application and multiple users
use your application from different browsers and each user interaction leads to concurrent read-write queries
on the same database. To support such scenarios, a common design pattern is this:
1. **One API server process** that embeds Ladybug
- and creates a single `READ_WRITE` Database object pointing to `example.lbug`.
+ and creates a single `READ_WRITE` Database object pointing to `example.lbdb`.
The API server is responsible for handling incoming requests from clients, say through HTTP or gRPC. The
requests' Cypher queries, which can read and write data to the database, are executed
(possibly) concurrently.
@@ -210,7 +210,7 @@ Sometimes, when you are working in a Jupyter notebook and building your Ladybug
open other processes that connect to the same directory as the database file, you may come across this error:
```console
-RuntimeError: IO exception: Could not set lock on file : /path/to/database/example.lbug
+RuntimeError: IO exception: Could not set lock on file : /path/to/database/example.lbdb
```
The lock, as described in earlier sections on this page, is present to protect you from inadvertent
diff --git a/src/content/docs/developer-guide/files.mdx b/src/content/docs/developer-guide/files.mdx
index 11bcc68..60e0907 100644
--- a/src/content/docs/developer-guide/files.mdx
+++ b/src/content/docs/developer-guide/files.mdx
@@ -24,10 +24,10 @@ in the same directory as the database file.
| File Type | Example |
| --- | --- |
-| Database file | `example.lbug` |
-| Write-ahead log file | `example.lbug.wal` |
-| Shadow file | `example.lbug.shadow` |
-| Temporary file | `example.lbug.tmp` |
+| Database file | `example.lbdb` |
+| Write-ahead log file | `example.lbdb.wal` |
+| Shadow file | `example.lbdb.shadow` |
+| Temporary file | `example.lbdb.tmp` |
#### Database file
diff --git a/src/content/docs/extensions/attach/lbug.md b/src/content/docs/extensions/attach/lbug.md
index 636b1af..e4946a4 100644
--- a/src/content/docs/extensions/attach/lbug.md
+++ b/src/content/docs/extensions/attach/lbug.md
@@ -28,15 +28,15 @@ you can attach to a single external Ladybug database (or be connected to the loc
Therefore, you don't need to prefix your node and relationship tables.
Instead, you will use the alias to `DETACH` from the external Ladybug database.
-Suppose you are connected to a local database `example.lbug`. After configuring a [S3 connection](/extensions/s3#configure-the-connection), you can attach a Ladybug database hosted on S3 as:
+Suppose you are connected to a local database `example.lbdb`. After configuring a [S3 connection](/extensions/s3#configure-the-connection), you can attach a Ladybug database hosted on S3 as:
```cypher
-ATTACH 's3://lbug-example/university.lbug.lbug' AS uw (dbtype lbug);
+ATTACH 's3://lbug-example/university.lbdb.lbdb' AS uw (dbtype lbug);
```
-After attaching a remote Ladybug database, you no longer have access to the original local Ladybug database `example.lbug`.
-After the `ATTACH` statement above, you can only query the external Ladybug database under `s3://lbug-example/university.lbug.lbug`.
+After attaching a remote Ladybug database, you no longer have access to the original local Ladybug database `example.lbdb`.
+After the `ATTACH` statement above, you can only query the external Ladybug database under `s3://lbug-example/university.lbdb.lbdb`.
-If you wish to attach to a database hosted on GCS instead, just replace the prefix `s3://` with `gs://` (in this case it would become `gs://lbug-example/university.lbug`). For more information on how to set up Ladybug with GCS, see [here](/extensions/gcs).
+If you wish to attach to a database hosted on GCS instead, just replace the prefix `s3://` with `gs://` (in this case it would become `gs://lbug-example/university.lbdb`). For more information on how to set up Ladybug with GCS, see [here](/extensions/gcs).
#### Execute queries on external Ladybug database
We only allow **read-only** queries to execute on external Ladybug databases (even if the external database is stored on local disk).
@@ -72,12 +72,12 @@ To detach from an external Ladybug database, use `DETACH [ALIAS]`:
DETACH uw;
```
-After the `DETACH` statement, you can continue querying your local Ladybug database `example.lbug`. Therefore, detaching
+After the `DETACH` statement, you can continue querying your local Ladybug database `example.lbdb`. Therefore, detaching
from an external Ladybug database switches your Ladybug database back to the local database you had started your session with.
### Use a local cache for remote files
-When connecting to a remote external Ladybug database, say the `s3://lbug-example/university.lbug` database in our example above,
+When connecting to a remote external Ladybug database, say the `s3://lbug-example/university.lbdb` database in our example above,
you would use the `httpfs` extension. When querying this remote database in Cypher, Ladybug will make HTTPS calls to the
remote server to query this database. You can speed up your Cypher queries by using the local httpfs cache,
similar to how you can speed up `LOAD FROM` queries using the [local httpfs cache](/extensions/httpfs#local-cache)
diff --git a/src/content/docs/extensions/vector.mdx b/src/content/docs/extensions/vector.mdx
index bbf75f7..bd784a4 100644
--- a/src/content/docs/extensions/vector.mdx
+++ b/src/content/docs/extensions/vector.mdx
@@ -39,7 +39,7 @@ extension to directly create the embeddings using Cypher.
import ladybug as lb
import os
-db = lb.Database("example.lbug")
+db = lb.Database("example.lbdb")
conn = lb.Connection(db)
from sentence_transformers import SentenceTransformer
@@ -99,7 +99,7 @@ for title, publisher in zip(titles, publishers):
import ladybug as lb
import os
-db = lb.Database("example.lbug")
+db = lb.Database("example.lbdb")
conn = lb.Connection(db)
conn.execute("INSTALL llm; LOAD llm;")
@@ -272,7 +272,7 @@ Let's run some example search queries on our newly created vector index.
import ladybug as lb
# Initialize the database
-db = lb.Database("example.lbug")
+db = lb.Database("example.lbdb")
conn = lb.Connection(db)
# Install and load vector extension once again
@@ -307,7 +307,7 @@ print(result.get_as_pl())
import ladybug as lb
# Initialize the database
-db = lb.Database("example.lbug")
+db = lb.Database("example.lbdb")
conn = lb.Connection(db)
# Install and load vector extension once again
diff --git a/src/content/docs/get-started/cypher-intro.mdx b/src/content/docs/get-started/cypher-intro.mdx
index b0458f4..64e03dd 100644
--- a/src/content/docs/get-started/cypher-intro.mdx
+++ b/src/content/docs/get-started/cypher-intro.mdx
@@ -35,12 +35,12 @@ Run the appropriate version of Ladybug Explorer via Docker as follows:
```bash
docker run --rm -p 8000:8000 \
- -v /path/to/example.lbug:/database \
+ -v /path/to/example.lbdb:/database \
ghcr.io/ladybugdb/explorer:latest
docker run -p 8000:8000 \
-v /path/to/local/directory:/database \
- -e LBUG_FILE=example.lbug \
+ -e LBUG_FILE=example.lbdb \
--rm ghcr.io/ladybugdb/explorer:latest
```
diff --git a/src/content/docs/get-started/graph-algorithms.md b/src/content/docs/get-started/graph-algorithms.md
index d329438..05d36c7 100644
--- a/src/content/docs/get-started/graph-algorithms.md
+++ b/src/content/docs/get-started/graph-algorithms.md
@@ -30,13 +30,13 @@ uv add lbug polars pyarrow networkx numpy scipy
## Create the graph
-First, initialize a connection to a new Ladybug database named `example.lbug`:
+First, initialize a connection to a new Ladybug database named `example.lbdb`:
```py
from pathlib import Path
import ladybug as lb
-db_path = "example.lbug"
+db_path = "example.lbdb"
Path(db_path).unlink(missing_ok=True)
Path(db_path + ".wal").unlink(missing_ok=True)
@@ -114,7 +114,7 @@ The first method to run a graph algorithm natively in Ladybug is using the `algo
```py
import ladybug as lb
-db_path = "example.lbug"
+db_path = "example.lbdb"
db = lb.Database(db_path)
conn = lb.Connection(db)
@@ -234,12 +234,12 @@ you want to run a graph algorithm that's not yet supported in Ladybug. It's triv
a NetworkX algorithm result into a Pandas/Polars DataFrame and write it back to Ladybug.
:::
-First, obtain a connection to the existing `example.lbug` database:
+First, obtain a connection to the existing `example.lbdb` database:
```py
import ladybug as lb
-db_path = "example.lbug"
+db_path = "example.lbdb"
db = lb.Database(db_path)
conn = lb.Connection(db)
diff --git a/src/content/docs/get-started/index.mdx b/src/content/docs/get-started/index.mdx
index 8cd656c..90f26ba 100644
--- a/src/content/docs/get-started/index.mdx
+++ b/src/content/docs/get-started/index.mdx
@@ -71,7 +71,7 @@ at the time of creating the database, as explained below.
### On-disk database
-If you specify a database path when initializing a database, such as `example.lbug`, Ladybug
+If you specify a database path when initializing a database, such as `example.lbdb`, Ladybug
will operate in the **on-disk** mode. In this mode, Ladybug persists all data to disk at the given
path. All transactions are logged to a Write-Ahead Log (WAL) and updates are periodically merged into the
database files during checkpoints.
@@ -119,7 +119,7 @@ import ladybug as lb
def main():
# Create an empty on-disk database and connect to it
- db = lb.Database("example.lbug")
+ db = lb.Database("example.lbdb")
conn = lb.Connection(db)
# Create schema
@@ -274,7 +274,7 @@ const lbug = require("lbug");
(async () => {
// Create an empty on-disk database and connect to it
- const db = new lb.Database("example.lbug");
+ const db = new lb.Database("example.lbdb");
const conn = new lb.Connection(db);
// Create the tables
@@ -351,7 +351,7 @@ import com.ladybugdb.*;
public class Main {
public static void main(String[] args) throws ObjectRefDestroyedException {
// Create an empty on-disk database and connect to it
- Database db = new Database("example.lbug");
+ Database db = new Database("example.lbdb");
Connection conn = new Connection(db);
// Create tables.
conn.query("CREATE NODE TABLE User(name STRING PRIMARY KEY, age INT64)");
@@ -405,7 +405,7 @@ use lbug::{Connection, Database, Error, SystemConfig};
fn main() -> Result<(), Error> {
// Create an empty on-disk database and connect to it
- let db = Database::new("example.lbug", SystemConfig::default())?;
+ let db = Database::new("example.lbdb", SystemConfig::default())?;
let conn = Connection::new(&db)?;
// Create the tables
@@ -458,7 +458,7 @@ func main() {
// Create an empty on-disk database and connect to it
systemConfig := lb.DefaultSystemConfig()
systemConfig.BufferPoolSize = 1024 * 1024 * 1024
- db, err := lb.OpenDatabase("example.lbug", systemConfig)
+ db, err := lb.OpenDatabase("example.lbdb", systemConfig)
if err != nil {
panic(err)
}
@@ -542,7 +542,7 @@ Next, replace the contents of `Sources/main.swift`:
import Ladybug
// Create an empty on-disk database and connect to it
-let db = try! Database("example.lbug")
+let db = try! Database("example.lbdb")
let conn = try! Connection(db)
// Create schema and load data
@@ -642,13 +642,13 @@ unique_ptr runQuery(const string_view &query, unique_ptr("example.lbug", systemConfig);
+ auto database = make_unique("example.lbdb", systemConfig);
auto connection = make_unique(database.get());
// Create the schema.
@@ -772,7 +772,7 @@ int main()
{
// Create an empty on-disk database and connect to it
lbug_database db;
- lbug_database_init("example.lbug", lbug_default_system_config(), &db);
+ lbug_database_init("example.lbdb", lbug_default_system_config(), &db);
// Connect to the database.
lbug_connection conn;
@@ -878,10 +878,10 @@ When using the Ladybug CLI's shell, you can create an on-disk database by specif
the `lbug` command in the terminal.
```bash
-lbug example.lbug
+lbug example.lbdb
```
```
-Opened the database example.lbug in read-write mode.
+Opened the database example.lbdb in read-write mode.
Enter ":help" for usage hints.
lbug>
```
diff --git a/src/content/docs/get-started/prepared-statements.mdx b/src/content/docs/get-started/prepared-statements.mdx
index 4437a25..1ef2248 100644
--- a/src/content/docs/get-started/prepared-statements.mdx
+++ b/src/content/docs/get-started/prepared-statements.mdx
@@ -108,13 +108,13 @@ runPreparedQuery(const string_view &query,
}
int main() {
- // Remove example.lbug
- remove("example.lbug");
- remove("example.lbug.wal");
+ // Remove example.lbdb
+ remove("example.lbdb");
+ remove("example.lbdb.wal");
// Create an empty on-disk database and connect to it
SystemConfig systemConfig;
- auto database = make_unique("example.lbug", systemConfig);
+ auto database = make_unique("example.lbdb", systemConfig);
auto connection = make_unique(database.get());
// Create the schema.
diff --git a/src/content/docs/import/copy-from-subquery.md b/src/content/docs/import/copy-from-subquery.md
index 4592558..2ea2f2c 100644
--- a/src/content/docs/import/copy-from-subquery.md
+++ b/src/content/docs/import/copy-from-subquery.md
@@ -46,7 +46,7 @@ command. This can be combined with predicate filters as follows:
import ladybug as lb
import pandas as pd
-db = lb.Database("example.lbug")
+db = lb.Database("example.lbdb")
conn = lb.Connection(db)
df = pd.DataFrame({
diff --git a/src/content/docs/import/merge.md b/src/content/docs/import/merge.md
index eb2b25e..45d23c8 100644
--- a/src/content/docs/import/merge.md
+++ b/src/content/docs/import/merge.md
@@ -68,7 +68,7 @@ Let's see this in action with an example.
import ladybug as lb
import pandas as pd
-db = lb.Database('example.lbug')
+db = lb.Database('example.lbdb')
conn = lb.Connection(db)
df = pd.DataFrame({
diff --git a/src/content/docs/tutorials/python/index.mdx b/src/content/docs/tutorials/python/index.mdx
index 6fd4e27..be728f9 100644
--- a/src/content/docs/tutorials/python/index.mdx
+++ b/src/content/docs/tutorials/python/index.mdx
@@ -75,7 +75,7 @@ import ladybug as lb
Next, create and connect to an empty Ladybug database:
```py
def main() -> None:
- db = lb.Database("social_network.lbug")
+ db = lb.Database("social_network.lbdb")
conn = lb.Connection(db)
# Rest of the code goes here
@@ -83,7 +83,7 @@ def main() -> None:
if __name__ == "__main__":
main()
```
-This will create a database `social_network.lbug` where the imported CSV data will be stored.
+This will create a database `social_network.lbdb` where the imported CSV data will be stored.
:::note[Note]
Ladybug also supports an "in-memory" mode where the database is active only during the execution of the Python program.
@@ -91,7 +91,7 @@ This mode is useful when you want to create on-the-fly graphs for ephemeral quer
For more information, refer to the example in the [create your first graph](/get-started) section.
:::
-For this tutorial, we are using the "on-disk" mode, and the database will be persisted to the `social_network.lbug` database file.
+For this tutorial, we are using the "on-disk" mode, and the database will be persisted to the `social_network.lbdb` database file.
### Define schema
The first step in building a Ladybug graph is to define a schema.
@@ -160,7 +160,7 @@ $ python src/create_db.py
If you run the program again, you'll get an error about duplicated primary keys.
This is because the data has already been imported into the Ladybug database, and because
Ladybug is strictly typed, you cannot overwrite data when there are primary key conflicts.
-To ingest the data again, you will have to delete the database file (i.e. `rm social_network.lbug`)
+To ingest the data again, you will have to delete the database file (i.e. `rm social_network.lbdb`)
in between runs.
:::
@@ -172,7 +172,7 @@ Replace the contents of `src/main.py` with the following code snippet:
import ladybug as lb
def main() -> None:
- db = lb.Database("social_network.lbug")
+ db = lb.Database("social_network.lbdb")
conn = lb.Connection(db)
# Query to be filled out below
@@ -351,7 +351,7 @@ python src/main.py
import ladybug as lb
def main() -> None:
- db = lb.Database("social_network.lbug")
+ db = lb.Database("social_network.lbdb")
conn = lb.Connection(db)
conn.execute("""
@@ -403,7 +403,7 @@ if __name__ == "__main__":
import ladybug as lb
def main() -> None:
- db = lb.Database("social_network.lbug")
+ db = lb.Database("social_network.lbdb")
conn = lb.Connection(db)
# Query to be filled out below
diff --git a/src/content/docs/tutorials/rust/index.mdx b/src/content/docs/tutorials/rust/index.mdx
index 39e4dbc..19d342f 100644
--- a/src/content/docs/tutorials/rust/index.mdx
+++ b/src/content/docs/tutorials/rust/index.mdx
@@ -93,10 +93,10 @@ fn main() -> Result<(), Error> {
Create and connect to an empty Ladybug database:
```rs
-let db = Database::new("social_network.lbug", SystemConfig::default())?;
+let db = Database::new("social_network.lbdb", SystemConfig::default())?;
let conn = Connection::new(&db)?;
```
-This will create a database `social_network.lbug` where the imported CSV data will be stored.
+This will create a database `social_network.lbdb` where the imported CSV data will be stored.
Ladybug also supports an `in-memory` mode where the database is active only during the execution of the Rust program. For more information, refer to the example in the [create your first graph](/get-started) section.
@@ -166,12 +166,12 @@ id|name|type|database name|comment
5|POSTS|REL|local(lbug)|
7|LIKES|REL|local(lbug)|
```
-The CSV data has been copied into a new Ladybug database in `social_network.lbug`.
+The CSV data has been copied into a new Ladybug database in `social_network.lbdb`.
:::note[Note]
If you run the program again, you'll get an error about duplicated primary keys.
This is because the data has already been imported into the Ladybug database. You
-will have to delete the database file (i.e. `rm social_network.lbug`)
+will have to delete the database file (i.e. `rm social_network.lbdb`)
in between runs.
:::
@@ -184,7 +184,7 @@ Replace the contents of `src/main.rs` with the following code snippet:
use lbug::{Connection, Database, Error, SystemConfig, Value};
fn main() -> Result<(), Error> {
- let db = Database::new("social_network.lbug", SystemConfig::default())?;
+ let db = Database::new("social_network.lbdb", SystemConfig::default())?;
let conn = Connection::new(&db)?;
// Rest of the code goes here.
@@ -390,7 +390,7 @@ cargo run --bin lbug_social_network
use lbug::{Connection, Database, Error, SystemConfig};
fn main() -> Result<(), Error> {
- let db = Database::new("social_network.lbug", SystemConfig::default())?;
+ let db = Database::new("social_network.lbdb", SystemConfig::default())?;
let conn = Connection::new(&db)?;
conn.query(
@@ -444,7 +444,7 @@ fn main() -> Result<(), Error> {
use lbug::{Connection, Database, Error, SystemConfig, Value};
fn main() -> Result<(), Error> {
- let db = Database::new("social_network.lbug", SystemConfig::default())?;
+ let db = Database::new("social_network.lbdb", SystemConfig::default())?;
let conn = Connection::new(&db)?;
let result1 = conn.query(