Trait taos_query::prelude::sync::Queryable

source ·
pub trait Queryable {
    type ResultSet: Fetchable;

Show 18 methods // Required methods fn query<T: AsRef<str>>(&self, sql: T) -> RawResult<Self::ResultSet>; fn query_with_req_id<T: AsRef<str>>( &self, sql: T, req_id: u64, ) -> RawResult<Self::ResultSet>; fn write_raw_meta(&self, _: &RawMeta) -> RawResult<()>; fn write_raw_block(&self, _: &RawBlock) -> RawResult<()>; fn write_raw_block_with_req_id(&self, _: &RawBlock, _: u64) -> RawResult<()>; fn put(&self, data: &SmlData) -> RawResult<()>; // Provided methods fn exec<T: AsRef<str>>(&self, sql: T) -> RawResult<usize> { ... } fn exec_many<T: AsRef<str>, I: IntoIterator<Item = T>>( &self, input: I, ) -> RawResult<usize> { ... } fn query_one<T: AsRef<str>, O: DeserializeOwned>( &self, sql: T, ) -> RawResult<Option<O>> { ... } fn server_version(&self) -> RawResult<Cow<'_, str>> { ... } fn create_topic( &self, name: impl AsRef<str>, sql: impl AsRef<str>, ) -> RawResult<()> { ... } fn create_topic_as_database( &self, name: impl AsRef<str>, db: impl Display, ) -> RawResult<()> { ... } fn databases(&self) -> RawResult<Vec<ShowDatabase>> { ... } fn topics(&self) -> RawResult<Vec<Topic>> { ... } fn describe(&self, table: &str) -> RawResult<Describe> { ... } fn database_exists(&self, name: &str) -> RawResult<bool> { ... } fn table_vgroup_id(&self, _db: &str, _table: &str) -> Option<i32> { ... } fn tables_vgroup_ids<T: AsRef<str>>( &self, _db: &str, _tables: &[T], ) -> Option<Vec<i32>> { ... }
}
Expand description

The synchronous query trait for TDengine connection.

Required Associated Types§

Required Methods§

source

fn query<T: AsRef<str>>(&self, sql: T) -> RawResult<Self::ResultSet>

source

fn query_with_req_id<T: AsRef<str>>( &self, sql: T, req_id: u64, ) -> RawResult<Self::ResultSet>

source

fn write_raw_meta(&self, _: &RawMeta) -> RawResult<()>

source

fn write_raw_block(&self, _: &RawBlock) -> RawResult<()>

source

fn write_raw_block_with_req_id(&self, _: &RawBlock, _: u64) -> RawResult<()>

source

fn put(&self, data: &SmlData) -> RawResult<()>

Provided Methods§

source

fn exec<T: AsRef<str>>(&self, sql: T) -> RawResult<usize>

source

fn exec_many<T: AsRef<str>, I: IntoIterator<Item = T>>( &self, input: I, ) -> RawResult<usize>

source

fn query_one<T: AsRef<str>, O: DeserializeOwned>( &self, sql: T, ) -> RawResult<Option<O>>

source

fn server_version(&self) -> RawResult<Cow<'_, str>>

Short for SELECT server_version() as String.

source

fn create_topic( &self, name: impl AsRef<str>, sql: impl AsRef<str>, ) -> RawResult<()>

source

fn create_topic_as_database( &self, name: impl AsRef<str>, db: impl Display, ) -> RawResult<()>

source

fn databases(&self) -> RawResult<Vec<ShowDatabase>>

source

fn topics(&self) -> RawResult<Vec<Topic>>

Topics information by SELECT * FROM information_schema.ins_topics sql.

§Compatibility

This is a 3.x-only API.

source

fn describe(&self, table: &str) -> RawResult<Describe>

source

fn database_exists(&self, name: &str) -> RawResult<bool>

Check if database exists

source

fn table_vgroup_id(&self, _db: &str, _table: &str) -> Option<i32>

source

fn tables_vgroup_ids<T: AsRef<str>>( &self, _db: &str, _tables: &[T], ) -> Option<Vec<i32>>

Object Safety§

This trait is not object safe.

Implementors§