pub struct Rbatis {
    pub pool: Arc<OnceCell<Pool>>,
    pub sql_intercepts: Arc<Vec<Box<dyn SqlIntercept>>>,
    pub log_plugin: Arc<Box<dyn LogPlugin>>,
}
Expand description

rbatis engine

Fields

pool: Arc<OnceCell<Pool>>sql_intercepts: Arc<Vec<Box<dyn SqlIntercept>>>log_plugin: Arc<Box<dyn LogPlugin>>

Implementations

create an Rbatis

new Rbatis from Option

link pool

link pool

link pool by DBPoolOptions for example:

set_log_plugin

set_sql_intercepts for many

get conn pool

can set option for example:

let rbatis = rbatis::Rbatis::new();
// rbatis.link(**).await;
// rbatis.get_pool().unwrap().set_max_open_conns()

get driver type

get an DataBase Connection used for the next step

get an DataBase Connection,and call begin method,used for the next step

is debug mode

exec sql

fetch raw Value

fetch and decode

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.