libsql/local/
mod.rs

1// TODO: Remove this once we have decided what we want to keep
2// from the old api.
3#![allow(dead_code)]
4
5pub mod connection;
6pub mod database;
7pub mod rows;
8pub mod statement;
9pub mod transaction;
10
11pub(crate) mod impls;
12
13pub use libsql_sys::ffi;
14
15pub use crate::{Error, Result};
16pub use connection::Connection;
17pub use database::Database;
18pub use rows::Row;
19pub use rows::Rows;
20pub use rows::RowsFuture;
21pub use statement::Statement;
22pub use transaction::Transaction;
23
24/// Return the version of the underlying SQLite library as a number.
25pub fn version_number() -> i32 {
26    unsafe { ffi::sqlite3_libversion_number() }
27}
28
29/// Return the version of the underlying SQLite library as a string.
30pub fn version() -> &'static str {
31    unsafe {
32        std::ffi::CStr::from_ptr(ffi::sqlite3_libversion())
33            .to_str()
34            .unwrap()
35    }
36}