mirror of
https://github.com/fluencelabs/sqlite-wasm-connector
synced 2025-04-22 15:42:14 +00:00
Add version
This commit is contained in:
parent
301f27e94a
commit
3cdedd7db6
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "sqlite"
|
name = "sqlite"
|
||||||
version = "0.17.1"
|
version = "0.17.2"
|
||||||
authors = ["Ivan Ukhov <ivan.ukhov@gmail.com>"]
|
authors = ["Ivan Ukhov <ivan.ukhov@gmail.com>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://github.com/stainless-steel/sqlite"
|
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)
|
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> {
|
fn last_error(raw: *mut ffi::sqlite3) -> Option<Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let code = ffi::sqlite3_errcode(raw);
|
let code = ffi::sqlite3_errcode(raw);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user