dpiContextCreateParams

Struct dpiContextCreateParams 

Source
#[repr(C)]
pub struct dpiContextCreateParams { pub defaultDriverName: *const c_char, pub defaultEncoding: *const c_char, pub loadErrorUrl: *const c_char, pub oracleClientLibDir: *const c_char, pub oracleClientConfigDir: *const c_char, pub sodaUseJsonDesc: c_int, pub useJsonId: c_int, }
Expand description

This structure is used for specifying parameters when creating an ODPI-C context by calling dpiContext_createWithParams().

Fields§

§defaultDriverName: *const c_char

A null-terminated string defining the default driver name to use when creating pools or standalone connections.

The standard is to set this value to "<name> : <version>", where <name> is the name of the driver and <version> is its version. There should be a single space character before and after the colon.

This value is shown in database views that give information about connections. For example, it is in the CLIENT_DRIVER column of V$SESSION_CONNECT_INFO.

If this member is NULL, then the default value will be the value of DPI_DEFAULT_DRIVER_NAME from dpi.h.

This member is propagated to the [dpiCommonCreateParams.driverName] and [dpiCommonCreateParams.driverNameLength] members when the function dpiContext_initCommonCreateParams() is called.

§defaultEncoding: *const c_char

A null-terminated string defining the default encoding to use for all string data (including NCHAR, NVARCHAR2 and NCLOB data) passed into or returned from the database.

If this member is NULL, then the default value will be “UTF-8”. The Oracle equivalent of this is “AL32UTF8”.

This member is propagated to the [dpiCommonCreateParams.encoding] and [dpiCommonCreateParams.nencoding] members when the function dpiContext_initCommonCreateParams() is called.

§loadErrorUrl: *const c_char

A null-terminated UTF-8 encoded string defining the URL that should be provided in the error message returned when the Oracle Client library cannot be loaded. This URL should direct the user to the installation instructions for the application or driver using ODPI-C. If this value is NULL then the default ODPI-C URL is provided in the error message instead.

§oracleClientLibDir: *const c_char

A null-terminated UTF-8 encoded string defining the location from which to load the Oracle Client library. If this value is not NULL it is the only location that is searched; otherwise, if this value is NULL the Oracle Client library is searched for in the usual fashion as noted in [Oracle Client Library Loading]. Also see that section for limitations on using this member.

§oracleClientConfigDir: *const c_char

A null-terminated UTF-8 encoded string defining the location the Oracle client library will search for configuration files. This is equivalent to setting the environment variable TNS_ADMIN. If this value is not NULL, it overrides any value set by the environment variable TNS_ADMIN.

§sodaUseJsonDesc: c_int

A boolean value indicating whether or not to use JSON descriptors with SODA. This requires Oracle Client 23.4 or higher and setting this value to 1 in earlier versions will simply be ignored. Once a call to dpiContext_createWithParams() is made with this structure, this member will be cleared if JSON descriptors cannot be used.

§useJsonId: c_int

A boolean value indicating whether or not to treat JSON ID values distinctly from other binary data.

Trait Implementations§

Source§

impl Clone for dpiContextCreateParams

Source§

fn clone(&self) -> dpiContextCreateParams

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 dpiContextCreateParams

Source§

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

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

impl Default for dpiContextCreateParams

Source§

fn default() -> Self

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

impl Copy for dpiContextCreateParams

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.