pub struct QueryResult {Show 16 fields
pub columns: Vec<ColumnMetadata>,
pub rows: Vec<Vec<Option<QueryValue>>>,
pub out_values: Vec<(usize, Option<QueryValue>)>,
pub return_values: Vec<(usize, Vec<Option<QueryValue>>)>,
pub cursor_id: u32,
pub row_count: u64,
pub more_rows: bool,
pub compilation_error_warning: bool,
pub last_rowid: Option<String>,
pub batch_errors: Vec<BatchServerError>,
pub array_dml_row_counts: Option<Vec<u64>>,
pub implicit_resultsets: Option<Vec<QueryValue>>,
pub token_num: Option<u64>,
pub sessionless_txn_state: Option<SessionlessTxnState>,
pub query_id: Option<u64>,
pub txn_in_progress: Option<bool>,
}Fields§
§columns: Vec<ColumnMetadata>§rows: Vec<Vec<Option<QueryValue>>>§out_values: Vec<(usize, Option<QueryValue>)>§return_values: Vec<(usize, Vec<Option<QueryValue>>)>§cursor_id: u32§row_count: u64§more_rows: bool§compilation_error_warning: bool§last_rowid: Option<String>Encoded rowid of the last affected row (reference cursor lastrowid).
batch_errors: Vec<BatchServerError>Batch errors collected with executemany(batcherrors=True).
array_dml_row_counts: Option<Vec<u64>>Per-iteration row counts from executemany(arraydmlrowcounts=True).
implicit_resultsets: Option<Vec<QueryValue>>Child cursors returned via dbms_sql.return_result
(QueryValue::Cursor entries); Some only when the response carried
a TNS_MSG_TYPE_IMPLICIT_RESULTSET message.
token_num: Option<u64>Pipeline token echoed by the server (TNS message 33) at the start of
each pipelined response; None outside pipelines.
sessionless_txn_state: Option<SessionlessTxnState>Sessionless transaction state update carried by the response’s SYNC
server-side piggyback (reference _update_sessionless_txn_state);
None when the execute did not change the sessionless state.
query_id: Option<u64>CQN registered-query id read from the registration-info block of the
execute return parameters (reference cursor_impl._query_id,
base.pyx:1300-1309). Some(0) when the server returned no query id
(qos without SUBSCR_QOS_QUERY); None when the block was absent.
txn_in_progress: Option<bool>Whether a server-side transaction is in progress, sampled from the final
end-of-call status bit TNS_EOCS_FLAGS_TXN_IN_PROGRESS (reference
protocol.pyx _process_call_status). None when the response carried no
STATUS message (the caller then leaves the flag unchanged).
Implementations§
Source§impl QueryResult
impl QueryResult
Sourcepub fn cell(&self, row: usize, col: usize) -> Option<&QueryValue>
pub fn cell(&self, row: usize, col: usize) -> Option<&QueryValue>
Borrow the value at (row, col) of the fetched result, or None when
either index is out of range or the cell is SQL NULL. Convenience
accessor so callers do not have to index rows[row][col] and unwrap
the Option by hand.
Sourcepub fn column_index(&self, name: &str) -> Option<usize>
pub fn column_index(&self, name: &str) -> Option<usize>
Zero-based column index of the column whose name matches name
case-insensitively (Oracle folds unquoted identifiers to upper case),
or None when there is no such column.
Trait Implementations§
Source§impl Clone for QueryResult
impl Clone for QueryResult
Source§fn clone(&self) -> QueryResult
fn clone(&self) -> QueryResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for QueryResult
impl Debug for QueryResult
Source§impl Default for QueryResult
impl Default for QueryResult
Source§fn default() -> QueryResult
fn default() -> QueryResult
Source§impl PartialEq for QueryResult
impl PartialEq for QueryResult
Source§fn eq(&self, other: &QueryResult) -> bool
fn eq(&self, other: &QueryResult) -> bool
self and other values to be equal, and is used by ==.