pub struct APIClient { /* private fields */ }
Implementations§
Source§impl APIClient
impl APIClient
pub async fn new(dsn: &str, name: Option<String>) -> Result<Self, Error>
pub fn host(&self) -> &str
pub fn port(&self) -> u16
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 fn set_last_node_id(&self, node_id: String)
pub async fn start_query(&self, sql: &str) -> Result<QueryResponse, Error>
pub async fn query_page( &self, query_id: &str, next_uri: &str, node_id: &Option<String>, ) -> Result<QueryResponse, Error>
pub async fn query(&self, sql: &str) -> Result<QueryResponse, Error>
pub async fn insert_with_stage( &self, sql: &str, stage: &str, file_format_options: BTreeMap<&str, &str>, copy_options: BTreeMap<&str, &str>, ) -> Result<QueryResponse, Error>
pub async fn upload_to_stage( &self, stage: &str, data: Box<dyn AsyncRead + Send + Sync + Unpin + 'static>, size: u64, ) -> Result<(), Error>
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