mirror of
https://github.com/launchbadge/sqlx
synced 2024-11-10 14:34:19 +00:00
feat(sqlite): add SqliteConnectOptions::filename
This commit is contained in:
parent
54c857b448
commit
63f37a78c3
1 changed files with 6 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue