-
Notifications
You must be signed in to change notification settings - Fork 85
Description
Path: /features/embedded-replicas/introduction
https://docs.turso.tech/features/embedded-replicas/introduction#usage
Hi! Having some confusion with the documentation...
The Rust example has:
use libsql::{Builder};
let build = Builder::new_remote_replica("file:replica.db", "libsql://...", "...")
.build()
.await?;
let client = build.connect()?;client.sync().await?;Feedback:
-
Change
use libsql::{Builder};touse libsql::Builder; -
clientis aConnection.Connectiondoesn't have anysyncmethod, butDatabasedoes... andbuildis aDatabase... so perhaps it should bebuild.sync().await?;? -
In general, it would be useful if the examples in the documentation used better, descriptive, and consistent variable names to improve understanding. For example, the prior snippet uses
dbandconn, which make more sense honestly thanbuildandclient. Why are they different here? If there's a good reason, the doc should explain it. If not, they should match the same names used everywhere else.