pub struct WOWSQLClient { /* private fields */ }Expand description
Main client for interacting with WOWSQL API
Implementations§
Source§impl WOWSQLClient
impl WOWSQLClient
Sourcepub fn new(project_url: &str, api_key: &str) -> Result<Self, WOWSQLError>
pub fn new(project_url: &str, api_key: &str) -> Result<Self, WOWSQLError>
Create a new WOWSQL client with default settings
Sourcepub fn builder(project_url: &str, api_key: &str) -> WOWSQLClientBuilder
pub fn builder(project_url: &str, api_key: &str) -> WOWSQLClientBuilder
Create a builder for advanced configuration
Sourcepub async fn list_tables(&self) -> Result<Vec<String>, WOWSQLError>
pub async fn list_tables(&self) -> Result<Vec<String>, WOWSQLError>
List all tables in the database
Sourcepub async fn get_table_schema(
&self,
table_name: &str,
) -> Result<TableSchema, WOWSQLError>
pub async fn get_table_schema( &self, table_name: &str, ) -> Result<TableSchema, WOWSQLError>
Get table schema information
Sourcepub async fn query<T: DeserializeOwned>(
&self,
sql: &str,
) -> Result<Vec<T>, WOWSQLError>
pub async fn query<T: DeserializeOwned>( &self, sql: &str, ) -> Result<Vec<T>, WOWSQLError>
Execute a raw SQL query (read-only)
Sourcepub async fn health(&self) -> Result<Value, WOWSQLError>
pub async fn health(&self) -> Result<Value, WOWSQLError>
Check API health
Auto Trait Implementations§
impl Freeze for WOWSQLClient
impl !RefUnwindSafe for WOWSQLClient
impl Send for WOWSQLClient
impl Sync for WOWSQLClient
impl Unpin for WOWSQLClient
impl UnsafeUnpin for WOWSQLClient
impl !UnwindSafe for WOWSQLClient
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