Struct databend_client::APIClient
source · pub struct APIClient {
pub cli: Client,
pub scheme: String,
pub host: String,
pub port: u16,
/* private fields */
}
Fields§
§cli: Client
§scheme: String
§host: String
§port: u16
Implementations§
source§impl APIClient
impl APIClient
pub async fn new(dsn: &str, name: Option<String>) -> Result<Self>
pub async fn current_warehouse(&self) -> Option<String>
pub async fn current_database(&self) -> Option<String>
pub async fn current_role(&self) -> Option<String>
pub fn username(&self) -> String
pub async fn handle_session(&self, session: &Option<SessionState>)
pub fn handle_warnings(&self, resp: &QueryResponse)
pub async fn start_query(&self, sql: &str) -> Result<QueryResponse>
pub async fn query_page( &self, query_id: &str, next_uri: &str, ) -> Result<QueryResponse>
pub async fn kill_query(&self, query_id: &str, kill_uri: &str) -> Result<()>
pub async fn wait_for_query(&self, resp: QueryResponse) -> Result<QueryResponse>
pub async fn query(&self, sql: &str) -> Result<QueryResponse>
pub async fn insert_with_stage( &self, sql: &str, stage: &str, file_format_options: BTreeMap<&str, &str>, copy_options: BTreeMap<&str, &str>, ) -> Result<QueryResponse>
pub async fn upload_to_stage( &self, stage: &str, data: Reader, size: u64, ) -> Result<()>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)