mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-04-08 19:25:50 +00:00
feat(sqlite): add SqliteConnectOptions::filename
This commit is contained in:
@@ -70,6 +70,12 @@ impl SqliteConnectOptions {
|
||||
}
|
||||
}
|
||||
|
||||
/// Sets the name of the database file.
|
||||
pub fn filename(mut self, filename: impl AsRef<Path>) -> Self {
|
||||
self.filename = Cow::Owned(filename.as_ref().to_owned());
|
||||
self
|
||||
}
|
||||
|
||||
/// Set the enforcement of [foreign key constriants](https://www.sqlite.org/pragma.html#pragma_foreign_keys).
|
||||
///
|
||||
/// By default, this is enabled.
|
||||
|
||||
Reference in New Issue
Block a user