dpiSodaOperOptions

Struct dpiSodaOperOptions 

Source
#[repr(C)]
pub struct dpiSodaOperOptions {
Show 15 fields pub numKeys: u32, pub keys: *mut *const c_char, pub keyLengths: *mut u32, pub key: *const c_char, pub keyLength: u32, pub version: *const c_char, pub versionLength: u32, pub filter: *const c_char, pub filterLength: u32, pub skip: u32, pub limit: u32, pub fetchArraySize: u32, pub hint: *const c_char, pub hintLength: u32, pub lock: c_int,
}
Expand description

This structure is used for passing search criteria to a number of SODA operations. It is initialized using the function dpiContext_initSodaOperOptions() and used by the functions dpiSodaColl_find(), dpiSodaColl_findOne(), dpiSodaColl_getDocCount(), dpiSodaColl_remove() and dpiSodaColl_replaceOne().

Fields§

§numKeys: u32

Specifies the number of elements in the members [dpiSodaOperOptions.keys] and [dpiSodaOperOptions.keyLengths].

§keys: *mut *const c_char

Specifies an array of key values which documents in the collection must have in order to be processed by the operation. The length of this array is defined by the member [dpiSodaOperOptions.numKeys].

§keyLengths: *mut u32

Specifies an array of key length values. Each element corresponds to the length of the key (in bytes) found in the member [dpiSodaOperOptions.keys] at the same element index. The length of this array is defined by the member [dpiSodaOperOptions.numKeys].

§key: *const c_char

Specifies the key which the document must have in order to be processed by the operation.

§keyLength: u32

Specifies the length of the member [dpiSodaOperOptions.key], in bytes.

§version: *const c_char

Specifies the document version that documents must have in order to be processed by the operation. This is typically used in conjunction with [dpiSodaOperOptions.key] and allows for opportunistic locking, so that operations do not affect a document that someone else has already modified.

§versionLength: u32

Specifies the length of the member [dpiSodaOperOptions.version], in bytes.

§filter: *const c_char

Specifies a filter value which limits the documents processed by the operation. See Overview of SODA Filter Specifications (QBEs).

§filterLength: u32

Specifies the length of the member [dpiSodaOperOptions.filter], in bytes.

§skip: u32

Specifies the number of documents to skip before processing documents in the collection. A value of 0 will result in no documents being skipped.

§limit: u32

Specifies the maximum number of documents to process in the collection. A value of 0 means no limit is enforced.

§fetchArraySize: u32

Specifies the number of documents that will be fetched at one time from a SODA collection. Increasing this value reduces the number of round-trips to the database but increases the amount of memory allocated. A value of 0 means that the default value (100) is used. This member is only supported in Oracle Client 19.5 and higher.

§hint: *const c_char

Specifies a hint that will be passed through to the SODA operation. These hints are the same as the hints used for normal SQL operations but without the enclosing comment characters. This member is only supported in Oracle Client 21.3 and higher (also available in Oracle Client 19 from 19.11).

§hintLength: u32

Specifies the length of the member [dpiSodaOperOptions.hint], in bytes. This member is only supported in Oracle Client 21.3 and higher (also available in Oracle Client 19 from 19.11).

§lock: c_int

Specifies whether the documents fetched from the collection should be locked (equivalent to SQL “select for update”). The next commit or rollback on the connection made after the operation is performed will “unlock” the documents. Ensure that the flag DPI_SODA_FLAGS_ATOMIC_COMMIT is not used for the operation as otherwise the lock will be removed immediately.

This member should only be used with read operations (other than dpiSodaColl_getDocCount()) and should not be used in conjunction with the [dpiSodaOperOptions.skip] and [dpiSodaOperOptions.limit] members.

If this member is specified in conjunction with a write operation the value is ignored.

This member is only supported in Oracle Client 21.3 and higher (also available in Oracle Client 19 from 19.11).

Trait Implementations§

Source§

impl Clone for dpiSodaOperOptions

Source§

fn clone(&self) -> dpiSodaOperOptions

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for dpiSodaOperOptions

Source§

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

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

impl Default for dpiSodaOperOptions

Source§

fn default() -> Self

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

impl Copy for dpiSodaOperOptions

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<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> 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.