Struct databend_client::APIClient
source · pub struct APIClient {
pub host: String,
pub port: u16,
pub database: Arc<Mutex<Option<String>>>,
pub user: String,
/* private fields */
}
Fields§
§host: String
§port: u16
§database: Arc<Mutex<Option<String>>>
§user: String
Implementations§
source§impl APIClient
impl APIClient
pub fn from_dsn(dsn: &str) -> Result<Self>
pub async fn query(&self, sql: &str) -> Result<QueryResponse>
pub async fn query_page(&self, next_uri: &str) -> Result<QueryResponse>
pub async fn wait_for_query(&self, resp: QueryResponse) -> Result<QueryResponse>
pub async fn query_wait(&self, sql: &str) -> Result<QueryResponse>
pub async fn insert_with_stage( &self, sql: &str, stage_location: &str, file_format_options: BTreeMap<&str, &str>, copy_options: BTreeMap<&str, &str> ) -> Result<QueryResponse>
pub async fn upload_to_stage( &self, stage_location: &str, data: impl AsyncRead + Send + Sync + 'static, size: u64 ) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
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