feat(sqlite): add SqliteConnectOptions::filename

This commit is contained in:
Ryan Leckey 2020-07-14 08:45:30 -07:00
parent 54c857b448
commit 63f37a78c3

View file

@ -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.