pub struct APIClient { /* private fields */ }
Implementations§
Source§impl APIClient
impl APIClient
pub async fn new(dsn: &str, name: Option<String>) -> Result<Arc<Self>, Error>
pub fn host(&self) -> &str
pub fn port(&self) -> u16
pub fn scheme(&self) -> &str
pub fn current_warehouse(&self) -> Option<String>
pub fn current_catalog(&self) -> Option<String>
pub fn current_database(&self) -> Option<String>
pub async fn current_role(&self) -> Option<String>
pub fn username(&self) -> String
pub fn set_last_node_id(&self, node_id: String)
pub fn set_last_query_id(&self, query_id: Option<String>)
pub fn last_query_id(&self) -> Option<String>
pub async fn start_query( self: &Arc<Self>, sql: &str, need_progress: bool, ) -> Result<Pages, Error>
pub async fn query_page( &self, query_id: &str, next_uri: &str, node_id: &Option<String>, ) -> Result<QueryResponse, Error>
pub async fn kill_query(&self, query_id: &str) -> Result<(), Error>
pub async fn query_all(self: &Arc<Self>, sql: &str) -> Result<Page, Error>
pub async fn insert_with_stage( self: &Arc<Self>, sql: &str, stage: &str, file_format_options: BTreeMap<&str, &str>, copy_options: BTreeMap<&str, &str>, ) -> Result<QueryStats, Error>
pub async fn upload_to_stage( self: &Arc<Self>, stage: &str, data: Box<dyn AsyncRead + Send + Sync + Unpin + 'static>, size: u64, ) -> Result<(), Error>
pub async fn close(&self)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for APIClient
impl !RefUnwindSafe for APIClient
impl Send for APIClient
impl Sync for APIClient
impl Unpin for APIClient
impl !UnwindSafe for APIClient
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