Skip to main content

Database

Struct Database 

Source
pub struct Database<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> Database<'a>

Source

pub fn new(env: &'a Environment, driver: &Driver) -> MyResult<Self>

Source

pub fn create_catalog(&self) -> MyResult<Catalog>

Source

pub fn query_context(&self) -> Context

Source

pub fn get_batch(&self) -> &str

Source

pub fn create_dataset<R: Read>( &self, query: &str, ) -> MyResult<Option<Dataset<'_, R>>>

Source

pub fn fetch_one<F: FnMut(Cow<'_, str>) -> MyResult<()>>( &self, query: &str, function: F, ) -> MyResult<()>

Source

pub fn fetch_two<F: FnMut(Cow<'_, str>, Cow<'_, str>) -> MyResult<()>>( &self, query: &str, function: F, ) -> MyResult<()>

Source

pub fn fetch_three<F: FnMut(Cow<'_, str>, Cow<'_, str>, Cow<'_, str>) -> MyResult<()>>( &self, query: &str, function: F, ) -> MyResult<()>

Source

pub fn fetch_four<F: FnMut(Cow<'_, str>, Cow<'_, str>, Cow<'_, str>, Cow<'_, str>) -> MyResult<()>>( &self, query: &str, function: F, ) -> MyResult<()>

Source

pub fn fetch_five<F: FnMut(Cow<'_, str>, Cow<'_, str>, Cow<'_, str>, Cow<'_, str>, Cow<'_, str>) -> MyResult<()>>( &self, query: &str, function: F, ) -> MyResult<()>

Source

pub fn fetch_records<F: FnMut(Vec<Cow<'_, str>>) -> MyResult<()>>( &self, query: &str, function: F, ) -> MyResult<()>

Source

pub fn with_catalog(self, sample: Sample) -> MyResult<Self>

Source

pub fn with_records(self, sample: Sample) -> MyResult<Self>

Auto Trait Implementations§

§

impl<'a> Freeze for Database<'a>

§

impl<'a> !RefUnwindSafe for Database<'a>

§

impl<'a> !Send for Database<'a>

§

impl<'a> !Sync for Database<'a>

§

impl<'a> Unpin for Database<'a>

§

impl<'a> UnsafeUnpin for Database<'a>

§

impl<'a> !UnwindSafe for Database<'a>

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, 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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.