mirror of
https://github.com/fluencelabs/sqlite-wasm-connector
synced 2025-03-15 06:20:50 +00:00
Add version
This commit is contained in:
parent
301f27e94a
commit
3cdedd7db6
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "sqlite"
|
||||
version = "0.17.1"
|
||||
version = "0.17.2"
|
||||
authors = ["Ivan Ukhov <ivan.ukhov@gmail.com>"]
|
||||
license = "MIT"
|
||||
repository = "https://github.com/stainless-steel/sqlite"
|
||||
|
@ -159,6 +159,14 @@ pub fn open<T: AsRef<std::path::Path>>(path: T) -> Result<Connection> {
|
||||
Connection::open(path)
|
||||
}
|
||||
|
||||
/// Return the version number of SQLite.
|
||||
///
|
||||
/// For instance, the version `3.8.11.1` corresponds to the integer `3008011`.
|
||||
#[inline]
|
||||
pub fn version() -> usize {
|
||||
unsafe { ffi::sqlite3_libversion_number() as usize }
|
||||
}
|
||||
|
||||
fn last_error(raw: *mut ffi::sqlite3) -> Option<Error> {
|
||||
unsafe {
|
||||
let code = ffi::sqlite3_errcode(raw);
|
||||
|
Loading…
x
Reference in New Issue
Block a user