pub struct SQLDatabase {
pub engine: Box<dyn Engine>,
pub sample_rows_number: i32,
pub all_tables: HashSet<String>,
}Fields§
§engine: Box<dyn Engine>§sample_rows_number: i32§all_tables: HashSet<String>Implementations§
Source§impl SQLDatabase
impl SQLDatabase
pub fn dialect(&self) -> Dialect
pub fn table_names(&self) -> Vec<String>
pub async fn table_info( &self, tables: &[String], ) -> Result<String, Box<dyn Error>>
pub async fn query(&self, query: &str) -> Result<String, Box<dyn Error>>
pub fn close(&self) -> Result<(), Box<dyn Error>>
pub async fn sample_rows(&self, table: &str) -> Result<String, Box<dyn Error>>
Auto Trait Implementations§
impl !RefUnwindSafe for SQLDatabase
impl !UnwindSafe for SQLDatabase
impl Freeze for SQLDatabase
impl Send for SQLDatabase
impl Sync for SQLDatabase
impl Unpin for SQLDatabase
impl UnsafeUnpin for SQLDatabase
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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