pub struct Taos(/* private fields */);
Implementations§
Trait Implementations§
source§impl AsyncBindable<Taos> for Stmt
impl AsyncBindable<Taos> for Stmt
fn init<'life0, 'async_trait>(
taos: &'life0 Taos
) -> Pin<Box<dyn Future<Output = RawResult<Self>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn init_with_req_id<'life0, 'async_trait>(
taos: &'life0 Taos,
req_id: u64
) -> Pin<Box<dyn Future<Output = RawResult<Self>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn prepare<'life0, 'life1, 'async_trait>(
&'life0 mut self,
sql: &'life1 str
) -> Pin<Box<dyn Future<Output = RawResult<&mut Self>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set_tbname<'life0, 'life1, 'async_trait>(
&'life0 mut self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = RawResult<&mut Self>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn bind<'life0, 'life1, 'async_trait>(
&'life0 mut self,
params: &'life1 [ColumnView]
) -> Pin<Box<dyn Future<Output = RawResult<&mut Self>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn add_batch<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = RawResult<&mut Self>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = RawResult<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn affected_rows<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn result_set<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<<Q as AsyncQueryable>::AsyncResultSet, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Send + 'async_trait,
source§impl AsyncQueryable for Taos
impl AsyncQueryable for Taos
type AsyncResultSet = ResultSet
fn query<'life0, 'async_trait, T>( &'life0 self, sql: T ) -> Pin<Box<dyn Future<Output = RawResult<Self::AsyncResultSet>> + Send + 'async_trait>>
fn query_with_req_id<'life0, 'async_trait, T>( &'life0 self, sql: T, req_id: u64 ) -> Pin<Box<dyn Future<Output = RawResult<Self::AsyncResultSet>> + Send + 'async_trait>>
fn write_raw_meta<'life0, 'life1, 'async_trait>(
&'life0 self,
meta: &'life1 RawMeta
) -> Pin<Box<dyn Future<Output = RawResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write_raw_block<'life0, 'life1, 'async_trait>(
&'life0 self,
block: &'life1 RawBlock
) -> Pin<Box<dyn Future<Output = RawResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write_raw_block_with_req_id<'life0, 'life1, 'async_trait>(
&'life0 self,
block: &'life1 RawBlock,
req_id: u64
) -> Pin<Box<dyn Future<Output = RawResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn put<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 SmlData
) -> Pin<Box<dyn Future<Output = RawResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn exec<'life0, 'async_trait, T>( &'life0 self, sql: T ) -> Pin<Box<dyn Future<Output = Result<usize, Error>> + Send + 'async_trait>>
fn exec_with_req_id<'life0, 'async_trait, T>( &'life0 self, sql: T, req_id: u64 ) -> Pin<Box<dyn Future<Output = Result<usize, Error>> + Send + 'async_trait>>
fn exec_many<'life0, 'async_trait, T, I>(
&'life0 self,
input: I
) -> Pin<Box<dyn Future<Output = Result<usize, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: AsRef<str> + Send + Sync + 'async_trait,
<I as IntoIterator>::IntoIter: Send,
I: IntoIterator<Item = T> + Send + 'async_trait,
Self: 'async_trait,
source§fn query_one<'life0, 'async_trait, T, O>(
&'life0 self,
sql: T
) -> Pin<Box<dyn Future<Output = Result<Option<O>, Error>> + Send + 'async_trait>>
fn query_one<'life0, 'async_trait, T, O>( &'life0 self, sql: T ) -> Pin<Box<dyn Future<Output = Result<Option<O>, Error>> + Send + 'async_trait>>
To conveniently get first row of the result, useful for queries like Read more
source§fn server_version<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Cow<'life0, str>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn server_version<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Cow<'life0, str>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Short for
SELECT server_version()
as String.source§fn create_database<'life0, 'async_trait, N>(
&'life0 self,
name: N
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
fn create_database<'life0, 'async_trait, N>( &'life0 self, name: N ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
Short for
CREATE DATABASE IF NOT EXISTS {name}
.source§fn use_database<'life0, 'async_trait, N>(
&'life0 self,
name: N
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
fn use_database<'life0, 'async_trait, N>( &'life0 self, name: N ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
Short for
USE {name}
.source§fn create_topic<'life0, 'async_trait, N, S>(
&'life0 self,
name: N,
sql: S
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
fn create_topic<'life0, 'async_trait, N, S>( &'life0 self, name: N, sql: S ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
Short for
CREATE TOPIC IF NOT EXISTS {name} AS {sql}
.source§fn create_topic_as_database<'life0, 'async_trait>(
&'life0 self,
name: impl AsRef<str> + Send + Sync + 'async_trait,
db: impl Display + Send + 'async_trait
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn create_topic_as_database<'life0, 'async_trait>(
&'life0 self,
name: impl AsRef<str> + Send + Sync + 'async_trait,
db: impl Display + Send + 'async_trait
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Short for
CREATE TOPIC IF NOT EXISTS {name} WITH META AS DATABASE {db}
.source§fn databases<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<ShowDatabase>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn databases<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<ShowDatabase>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Short for
SHOW DATABASES
.source§fn topics<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<Topic>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn topics<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<Topic>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Topics information by
SELECT * FROM information_schema.ins_topics
sql. Read moresource§fn describe<'life0, 'life1, 'async_trait>(
&'life0 self,
table: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Describe, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn describe<'life0, 'life1, 'async_trait>(
&'life0 self,
table: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Describe, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Get table meta information.
source§fn database_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn database_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Check if database exists
source§fn query_sync<T>(&self, sql: T) -> Result<Self::AsyncResultSet, Error>
fn query_sync<T>(&self, sql: T) -> Result<Self::AsyncResultSet, Error>
Sync version of
query
.source§impl Bindable<Taos> for Stmt
impl Bindable<Taos> for Stmt
fn init(taos: &Taos) -> RawResult<Self>
fn init_with_req_id(taos: &Taos, req_id: u64) -> RawResult<Self>
fn prepare<S: AsRef<str>>(&mut self, sql: S) -> RawResult<&mut Self>
fn set_tbname<S: AsRef<str>>(&mut self, name: S) -> RawResult<&mut Self>
fn bind(&mut self, params: &[ColumnView]) -> RawResult<&mut Self>
fn add_batch(&mut self) -> RawResult<&mut Self>
fn execute(&mut self) -> RawResult<usize>
fn affected_rows(&self) -> usize
fn result_set(&mut self) -> Result<<Q as Queryable>::ResultSet, Error>
source§impl Queryable for Taos
impl Queryable for Taos
type ResultSet = ResultSet
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, meta: &RawMeta) -> RawResult<()>
fn write_raw_block(&self, block: &RawBlock) -> RawResult<()>
fn write_raw_block_with_req_id( &self, block: &RawBlock, req_id: u64 ) -> RawResult<()>
fn put(&self, data: &SmlData) -> RawResult<()>
fn exec<T>(&self, sql: T) -> Result<usize, Error>
fn exec_many<T, I>(&self, input: I) -> Result<usize, Error>
fn query_one<T, O>(&self, sql: T) -> Result<Option<O>, Error>
source§fn server_version(&self) -> Result<Cow<'_, str>, Error>
fn server_version(&self) -> Result<Cow<'_, str>, Error>
Short for
SELECT server_version()
as String.fn create_topic( &self, name: impl AsRef<str>, sql: impl AsRef<str> ) -> Result<(), Error>
fn create_topic_as_database( &self, name: impl AsRef<str>, db: impl Display ) -> Result<(), Error>
fn databases(&self) -> Result<Vec<ShowDatabase>, Error>
source§fn topics(&self) -> Result<Vec<Topic>, Error>
fn topics(&self) -> Result<Vec<Topic>, Error>
Topics information by
SELECT * FROM information_schema.ins_topics
sql. Read morefn describe(&self, table: &str) -> Result<Describe, Error>
Auto Trait Implementations§
impl !Freeze for Taos
impl !RefUnwindSafe for Taos
impl Send for Taos
impl Sync for Taos
impl Unpin for Taos
impl !UnwindSafe for Taos
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