Skip to main content

SqliteRuntime

Struct SqliteRuntime 

Source
pub struct SqliteRuntime { /* private fields */ }
Expand description

vldb-sqlite 纯库多库运行时。 Pure library multi-database runtime for vldb-sqlite.

Implementations§

Source§

impl SqliteRuntime

Source

pub fn new() -> Self

使用默认参数创建一个新的多库 runtime。 Create a new multi-database runtime with default options.

Source

pub fn with_default_options(default_options: SqliteOpenOptions) -> Self

使用给定默认参数创建多库 runtime。 Create a multi-database runtime with caller-provided default options.

Source

pub fn default_options(&self) -> &SqliteOpenOptions

获取默认打开选项。 Get the default open options.

Source

pub fn open_database( &self, db_path: impl AsRef<str>, ) -> Result<Arc<SqliteDatabaseHandle>, BoxError>

打开或复用指定路径的数据库句柄。 Open or reuse a database handle for the specified path.

Source

pub fn open_database_with_options( &self, db_path: impl AsRef<str>, options: SqliteOpenOptions, ) -> Result<Arc<SqliteDatabaseHandle>, BoxError>

使用显式选项打开或复用指定路径的数据库句柄。 Open or reuse a database handle for the specified path with explicit options.

Source

pub fn get_database( &self, db_path: impl AsRef<str>, ) -> Option<Arc<SqliteDatabaseHandle>>

获取已缓存的数据库句柄。 Get an already-cached database handle.

Source

pub fn close_database(&self, db_path: impl AsRef<str>) -> bool

关闭并移除指定数据库句柄。 Close and remove a database handle.

Source

pub fn list_databases(&self) -> Vec<String>

列出当前 runtime 中已注册的数据库路径。 List database paths currently registered in the runtime.

Source

pub fn database_count(&self) -> usize

返回当前 runtime 中已注册的数据库数量。 Return the number of databases currently registered in the runtime.

Trait Implementations§

Source§

impl Debug for SqliteRuntime

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SqliteRuntime

Source§

fn default() -> Self

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

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,