Skip to content

Commit ab3cfa0

Browse files
committed
chore: edit docs and add LF after multi-line calls
1 parent 92f9c10 commit ab3cfa0

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

crates/sqlx-sqlite-conn-mgr/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ queries.
139139

140140
3. **WAL Mode**: WAL (Write-Ahead Logging) mode is automatically enabled
141141
on the first call to `acquire_writer()` per `SqliteDatabase` instance.
142-
The operation is idempotent and safe to call across multiple sessions,
143-
allowing concurrent reads during writes.
142+
The operation is idempotent and safe to call across multiple sessions.
143+
WAL mode allows concurrent reads during writes.
144144

145145
4. **Exclusive Writes**: The write pool has `max_connections=1`, ensuring
146146
only one writer can exist at a time. Other callers to

crates/sqlx-sqlite-conn-mgr/src/database.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ use std::sync::atomic::{AtomicBool, Ordering};
1313

1414
/// SQLite database with connection pooling for concurrent reads and optional exclusive writes.
1515
///
16-
/// The database is opened in read-write mode but can be used for read-only operations
17-
/// by calling `read_pool()`. Write operations are available by calling `acquire_writer()`
18-
/// which lazily initializes WAL mode on first use.
16+
/// Once the database is opened, it can be used for read-only operations by calling `read_pool()`.
17+
/// Write operations are available by calling `acquire_writer()` which lazily initializes WAL
18+
/// mode on first use.
1919
///
2020
/// # Example
2121
///
@@ -66,7 +66,7 @@ impl SqliteDatabase {
6666
/// If the database is already connected, returns the existing connection.
6767
/// Multiple calls with the same path will return the same database instance.
6868
///
69-
/// The database is created if it doesn't exist. WAL mode is optionally enabled when
69+
/// The database is created if it doesn't exist. WAL mode is enabled when
7070
/// `acquire_writer()` is first called.
7171
///
7272
/// # Arguments
@@ -174,7 +174,7 @@ impl SqliteDatabase {
174174
.await
175175
}
176176

177-
/// Get a reference to the connection pool for executing SELECT queries
177+
/// Get a reference to the connection pool for executing read queries
178178
///
179179
/// Use this for concurrent read operations. Multiple readers can access
180180
/// the pool simultaneously.
@@ -370,6 +370,7 @@ mod tests {
370370
.fetch_one(db.read_pool().unwrap())
371371
.await
372372
.unwrap();
373+
373374
assert_eq!(count, 12);
374375
}));
375376
}

crates/sqlx-sqlite-conn-mgr/src/registry.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ fn canonicalize_path(path: &Path) -> std::io::Result<PathBuf> {
106106
let filename = path
107107
.file_name()
108108
.ok_or_else(|| std::io::Error::new(std::io::ErrorKind::InvalidInput, "Invalid path"))?;
109+
109110
let canonical_parent = parent.canonicalize()?;
110111

111112
// Note: We preserve the filename case as provided. On case-insensitive

0 commit comments

Comments
 (0)