dpiConnCreateParams

Struct dpiConnCreateParams 

Source
#[repr(C)]
pub struct dpiConnCreateParams {
Show 22 fields pub authMode: dpiAuthMode, pub connectionClass: *const c_char, pub connectionClassLength: u32, pub purity: dpiPurity, pub newPassword: *const c_char, pub newPasswordLength: u32, pub appContext: *mut dpiAppContext, pub numAppContext: u32, pub externalAuth: c_int, pub externalHandle: *mut c_void, pub pool: *mut dpiPool, pub tag: *const c_char, pub tagLength: u32, pub matchAnyTag: c_int, pub outTag: *const c_char, pub outTagLength: u32, pub outTagFound: c_int, pub shardingKeyColumns: *mut dpiShardingKeyColumn, pub numShardingKeyColumns: u8, pub superShardingKeyColumns: *mut dpiShardingKeyColumn, pub numSuperShardingKeyColumns: u8, pub outNewSession: c_int,
}
Expand description

This structure is used for creating connections to the database, whether standalone or acquired from a session pool. All members are initialized to default values using the dpiContext_initConnCreateParams() function. Care should be taken to ensure a copy of this structure exists only as long as needed to create the connection since it can contain a clear text copy of credentials used for connecting to the database.

Fields§

§authMode: dpiAuthMode

Specifies the mode used for authorizing connections. It is expected to be one or more of the values from the enumeration dpiAuthMode, OR’ed together. The default value is DPI_MODE_AUTH_DEFAULT.

§connectionClass: *const c_char

Specifies the connection class to use when connecting to the database. This is used with DRCP (database resident connection pooling) or to further subdivide a session pool. It is expected to be NULL (meaning that no connection class will be set) or a byte string in the encoding used for CHAR data. The default value is NULL.

§connectionClassLength: u32

Specifies the length of the [dpiConnCreateParams.connectionClass] member, in bytes. The default value is 0.

§purity: dpiPurity

Specifies the level of purity required when creating a connection using a connection class. It is expected to be one of the values from the enumeration dpiPurity. The default value is DPI_PURITY_DEFAULT.

§newPassword: *const c_char

Specifies the new password to set when creating a connection. This value is only used when creating a standalone connection. It is expected to be NULL or a byte string in the encoding used for CHAR data. The default value of this member is NULL. If specified, the password for the user is changed when the connection is created (useful when the password has expired and a session cannot be established without changing the password).

§newPasswordLength: u32

Specifies the length of the [dpiConnCreateParams.newPassword] member, in bytes. The default value is 0.

§appContext: *mut dpiAppContext

Specifies the application context that will be set when the connection is created. This value is only used when creating standalone connections. It is expected to be NULL or an array of dpiAppContext structures. The context specified here can be used in logon triggers, for example. The default value is NULL.

§numAppContext: u32

Specifies the number of elements found in the [dpiConnCreateParams.appContext] member. The default value is 0.

§externalAuth: c_int

Specifies whether external authentication should be used to create the connection. If this value is 0, the user name and password values must be specified in the call to dpiConn_create(); otherwise, the user name and password values must be zero length or NULL. The default value is 0.

§externalHandle: *mut c_void

Specifies an OCI service context handle created externally that will be used instead of creating a connection from scratch. The default value is NULL. Note that this connection depends on the external handle remaining valid for the lifetime of this connection. It is also important to ensure that the last reference to this connection is released before the external service context handle and environment handle are destroyed. Unlike regular connections, no attempt is made to rollback any outstanding transactions or close any open statements, objects and LOBs when the last reference to this connection is released, since attempts to do so after the external service context handle and environment are destroyed may result in crashes and other undesirable behavior.

§pool: *mut dpiPool

Specifies the session pool from which to acquire a connection or NULL if a standalone connection should be created. The default value is NULL. If the method dpiPool_acquireConnection() is being called, this value is ignored.

§tag: *const c_char

Specifies the tag to use when acquiring a connection from a session pool. This member is ignored when creating a standalone connection. If specified, the tag restricts the type of session that can be returned to those with that tag or a NULL tag. If the member [dpiConnCreateParams.matchAnyTag] is set, however, any session can be returned if no matching sessions are found.

The value is expected to be NULL (any session can be returned) or a byte string in the encoding used for CHAR data. The default value is NULL. If specified, the value should be one or more properties (specified in the form key=value) separated by semicolons.

§tagLength: u32

Specifies the length of the [dpiConnCreateParams.tag] member, in bytes. The default value is 0.

§matchAnyTag: c_int

Specifies whether any tagged session should be accepted when acquiring a connection from a session pool, if no connection using the tag specified in the [dpiConnCreateParams.tag] is available. This value is only used when acquiring a connection from a session pool. The default value is 0.

§outTag: *const c_char

Specifies the tag of the connection that was acquired from a session pool, or NULL if the session was not tagged. This member is left untouched when creating a standalone connection and is filled in only if the connection acquired from the session pool was tagged. If filled in, it is a byte string in the encoding used for CHAR data.

§outTagLength: u32

Specifies the length of the [dpiConnCreateParams.outTag] member, in bytes.

§outTagFound: c_int

Specifies if the connection created used the tag specified by the [dpiConnCreateParams.tag] member. It is only filled in if the connection was acquired from a session pool and a tag was initially specified.

§shardingKeyColumns: *mut dpiShardingKeyColumn

Specifies an array of dpiShardingKeyColumn structures which are used to identify which database shard should be connected to. The number of elements in the array is assumed to contain at least [dpiConnCreateParams.numShardingKeyColumns] elements.

§numShardingKeyColumns: u8

Specifies the number of elements in the array of sharding key columns found in the member [dpiConnCreateParams.shardingKeyColumns].

§superShardingKeyColumns: *mut dpiShardingKeyColumn

Specifies an array of dpiShardingKeyColumn structures which are used to identify which database shard should be connected to. The number of elements in the array is assumed to contain at least [dpiConnCreateParams.numSuperShardingKeyColumns] elements.

§numSuperShardingKeyColumns: u8

Specifies the number of elements in the array of sharding key columns found in the member [dpiConnCreateParams.superShardingKeyColumns].

§outNewSession: c_int

Specifies if the connection created was newly created by the session pool and has never been acquired from the pool (1) or not (0). It is only filled in if the connection was acquired from a session pool.

Trait Implementations§

Source§

impl Clone for dpiConnCreateParams

Source§

fn clone(&self) -> dpiConnCreateParams

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 dpiConnCreateParams

Source§

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

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

impl Default for dpiConnCreateParams

Source§

fn default() -> Self

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

impl Copy for dpiConnCreateParams

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.