INNER CODE UNIT · Rust
open_in_memory
rusqlite/rusqlite · src/lib.rs:459
pub fn open_in_memory() -> Result<Self> {
let flags = OpenFlags::default();
Self::open_in_memory_with_flags(flags)
}
/// Open a new connection to a SQLite database.
///
/// [Database Connection](http://www.sqlite.org/c3ref/open.html) for a description of valid
/// flag combinations.
///
/// # Failure
///
/// Will return `Err` if `path` cannot be converted to a C-compatible
/// string or if the underlying SQLite open call fails.
#[inline]
pub fn open_with_flags<P: AsRef<Path>>(path: P, flags: OpenFlags) -> Result<Self> {
let c_path = path_to_cstring(path.as_ref())?;
InnerConnection::open_with_flags(&c_path, flags, None).map(|db| Self {