mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-10-03 07:45:30 +00:00
feat(sqlite): add SqliteConnectOptions::filename
This commit is contained in:
parent
54c857b448
commit
63f37a78c3
@ -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).
|
/// Set the enforcement of [foreign key constriants](https://www.sqlite.org/pragma.html#pragma_foreign_keys).
|
||||||
///
|
///
|
||||||
/// By default, this is enabled.
|
/// By default, this is enabled.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user