pub struct ResultSet { /* private fields */ }
Expand description
Set of rows in response to a SQL query
Implementations§
Source§impl ResultSet
impl ResultSet
pub fn new_from_query_response(query_response: QueryResponse) -> Self
pub fn new_from_get_query_results_response( get_query_results_response: GetQueryResultsResponse, ) -> Self
Sourcepub fn next_row(&mut self) -> bool
pub fn next_row(&mut self) -> bool
Moves the cursor froward one row from its current position. A ResultSet cursor is initially positioned before the first row; the first call to the method next makes the first row the current row; the second call makes the second row the current row, and so on.
Sourcepub fn column_names(&self) -> Vec<String>
pub fn column_names(&self) -> Vec<String>
List of column names for this result set.
Sourcepub fn column_index(&self, column_name: &str) -> Option<&usize>
pub fn column_index(&self, column_name: &str) -> Option<&usize>
Returns the index for a column name.
pub fn get_i64(&self, col_index: usize) -> Result<Option<i64>, BQError>
pub fn get_i64_by_name(&self, col_name: &str) -> Result<Option<i64>, BQError>
pub fn get_serde<T>(&self, col_index: usize) -> Result<Option<T>, BQError>where
T: DeserializeOwned,
pub fn get_serde_by_name<T>(&self, col_name: &str) -> Result<Option<T>, BQError>where
T: DeserializeOwned,
pub fn get_f64(&self, col_index: usize) -> Result<Option<f64>, BQError>
pub fn get_f64_by_name(&self, col_name: &str) -> Result<Option<f64>, BQError>
pub fn get_bool(&self, col_index: usize) -> Result<Option<bool>, BQError>
pub fn get_bool_by_name(&self, col_name: &str) -> Result<Option<bool>, BQError>
pub fn get_string(&self, col_index: usize) -> Result<Option<String>, BQError>
pub fn get_string_by_name( &self, col_name: &str, ) -> Result<Option<String>, BQError>
pub fn get_json_value(&self, col_index: usize) -> Result<Option<Value>, BQError>
pub fn get_json_value_by_name( &self, col_name: &str, ) -> Result<Option<Value>, BQError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ResultSet
impl RefUnwindSafe for ResultSet
impl Send for ResultSet
impl Sync for ResultSet
impl Unpin for ResultSet
impl UnwindSafe for ResultSet
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request