Skip to main content

QueryResult

Struct QueryResult 

Source
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

Source

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.

Source

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

Source§

fn clone(&self) -> QueryResult

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for QueryResult

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for QueryResult

Source§

fn default() -> QueryResult

Returns the “default value” for a type. Read more
Source§

impl PartialEq for QueryResult

Source§

fn eq(&self, other: &QueryResult) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for QueryResult

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V