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 fn current_warehouse(&self) -> Option<String>
pub 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 set_last_node_id(&self, node_id: String)
pub fn last_node_id(&self) -> Option<String>
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, node_id: &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<()>
pub async fn login(&mut self) -> Result<()>
pub fn build_log_out_request(&mut self) -> Result<Request>
pub async fn refresh_session_token( &self, self_login_info: Arc<Mutex<(SessionTokenInfo, Instant)>>, ) -> 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