mirror of
https://github.com/fluencelabs/sqlite-wasm-connector
synced 2025-04-25 16:52:15 +00:00
Adjust the description of Database
This commit is contained in:
parent
9bd6db2ab5
commit
f776e1daf6
@ -5,7 +5,7 @@ use std::path::Path;
|
|||||||
|
|
||||||
use {Result, Statement};
|
use {Result, Statement};
|
||||||
|
|
||||||
/// A database.
|
/// A connection to a database.
|
||||||
pub struct Database<'l> {
|
pub struct Database<'l> {
|
||||||
raw: *mut raw::sqlite3,
|
raw: *mut raw::sqlite3,
|
||||||
busy_callback: Option<Box<FnMut(usize) -> bool + 'l>>,
|
busy_callback: Option<Box<FnMut(usize) -> bool + 'l>>,
|
||||||
@ -13,7 +13,7 @@ pub struct Database<'l> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'l> Database<'l> {
|
impl<'l> Database<'l> {
|
||||||
/// Open a database.
|
/// Open a connection to a new or existing database.
|
||||||
pub fn open(path: &Path) -> Result<Database<'l>> {
|
pub fn open(path: &Path) -> Result<Database<'l>> {
|
||||||
let mut raw = 0 as *mut _;
|
let mut raw = 0 as *mut _;
|
||||||
unsafe {
|
unsafe {
|
||||||
|
@ -73,7 +73,7 @@ pub use statement::{Statement, Binding, Value, State};
|
|||||||
/// A result.
|
/// A result.
|
||||||
pub type Result<T> = ::std::result::Result<T, Error>;
|
pub type Result<T> = ::std::result::Result<T, Error>;
|
||||||
|
|
||||||
/// Open a database.
|
/// Open a connection to a new or existing database.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn open<'l>(path: &std::path::Path) -> Result<Database<'l>> {
|
pub fn open<'l>(path: &std::path::Path) -> Result<Database<'l>> {
|
||||||
Database::open(path)
|
Database::open(path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user