#[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_charA 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_charA 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_charA 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_charA 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_charA 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_intA 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_intA boolean value indicating whether or not to treat JSON ID values distinctly from other binary data.
Trait Implementations§
Source§impl Clone for dpiContextCreateParams
impl Clone for dpiContextCreateParams
Source§fn clone(&self) -> dpiContextCreateParams
fn clone(&self) -> dpiContextCreateParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more