Skip to main content

Module connection

Module connection 

Source
Expand description

SQLite connection implementation.

This module provides safe wrappers around SQLite’s C API and implements the Connection trait from sqlmodel-core.

§Console Integration

When the console feature is enabled, the connection can report status during operations. Use the ConsoleAware trait to attach a console.

use sqlmodel_sqlite::SqliteConnection;
use sqlmodel_console::{SqlModelConsole, ConsoleAware};
use std::sync::Arc;

let console = Arc::new(SqlModelConsole::new());
let mut conn = SqliteConnection::open_memory().unwrap();
conn.set_console(Some(console));

Structs§

OpenFlags
Flags controlling how the database is opened.
SqliteConfig
Configuration for opening SQLite connections.
SqliteConnection
A connection to a SQLite database.
SqliteTransaction
A SQLite transaction.