Skip to main content

Crate oracledb

Crate oracledb 

Source

Modules§

guide
Rust-oracledb Driver User Guide.

Structs§

Config
Represents configuration used to establish a standalone connection to the database using connect().
Connection
Represents a connection to the database. This can be either a standalone connection created by calling connect() or a pooled connection created by calling Pool::acquire()
Cursor
Represents a set of rows retrieved from the database by calling Connection::query() or Connection::query_named(). This struct implements the Iterator trait.
DbType
Repreents a database type supported by the library.
EndUserSecurityContext
Validated, pre-serialized Deep Data Security payload.
EndUserSecurityContextBuilder
Builder used to add optional data roles and attributes before encoding.
Error
Represents errors returned by the library.
ExecResult
Represents the result returned by the database when calling Connection::execute(), Connection::execute_named(), or Connection::execute_batch().
Lob
Represents a database LOB locator.
Metadata
Represents the metadata of columns fetched from the database.
OracleIntervalDS
Represents the value of INTERVAL DAY TO SECOND columns in the database.
OracleIntervalYM
Represents the value of INTERVAL YEAR TO MONTH columns in the database.
OracleNumber
Represents the value of NUMBER columns in the database.
OracleTimestamp
Represents the value of DATE, TIMESTAMP, TIMESTAMP WITH LOCAL TIME ZONE and TIMESTAMP WITH TIME ZONE columns in the database.
OracleVersion
Represents a version number used by Oracle Database (5 parts).
Pool
Represents a connection pool which manages connections. It is created by calling create_pool().
PoolConfig
Represents configuration used to create a connection pool using create_pool().
SparseVector
Represents a sparse vector.
Statement
Represents SQL statements that can be executed with various options.

Enums§

BindParameters
Values passed as bind parameters to the database.
EndUserIdentity
End-user identity for a Deep Data Security context.
ErrorKind
Types of errors returned by the library.
JsonValue
Types of JSON values supported.
Vector
Tyeps of vectors supported by the library.
VectorData
Types of data supported by vectors.

Constants§

AUTH_MODE_DEFAULT
This constant is used to specify that default authentication is to take place and is the value used if Config::set_auth_mode is not called.
AUTH_MODE_SYSASM
This constant is used to specify that SYSASM access is to be acquired.
AUTH_MODE_SYSBKP
This constant is used to specify that SYSBACKUP access is to be acquired.
AUTH_MODE_SYSDBA
This constant is used to specify that SYSDBA access is to be acquired.
AUTH_MODE_SYSDGD
This constant is used to specify that SYSDG access is to be acquired.
AUTH_MODE_SYSKMT
This constant is used to specify that SYSKM access is to be acquired.
AUTH_MODE_SYSOPER
This constant is used to specify that SYSOPER access is to be acquired.
AUTH_MODE_SYSRAC
This constant is used to specify that SYSRAC access is to be acquired.
DB_TYPE_BFILE
Describes columns, attributes or array elements in a database that are of type BFILE.
DB_TYPE_BINARY_DOUBLE
Describes columns, attributes or array elements in a database that are of type BINARY_DOUBLE.
DB_TYPE_BINARY_FLOAT
Describes columns, attributes or array elements in a database that are of type BINARY_FLOAT.
DB_TYPE_BINARY_INTEGER
Describes attributes or array elements in a database that are of type BINARY_INTEGER.
DB_TYPE_BLOB
Describes columns, attributes or array elements in a database that are of type BLOB.
DB_TYPE_BOOLEAN
Describes columns, attributes or array elements in a database that are of type BOOLEAN. Prior to Oracle Database 26ai, columns could not be of type BOOLEAN and the type could only be used in PL/SQL.
DB_TYPE_CHAR
Describes columns, attributes or array elements in a database that are of type CHAR.
DB_TYPE_CLOB
Describes columns, attributes or array elements in a database that are of type CLOB.
DB_TYPE_CURSOR
Describes columns in a database that are of type CURSOR. In PL/SQL, these are known as REF CURSOR.
DB_TYPE_DATE
Describes columns, attributes or array elements in a database that are of type DATE.
DB_TYPE_INTERVAL_DS
Describes columns, attributes or array elements in a database that are of type INTERVAL DAY TO SECOND.
DB_TYPE_INTERVAL_YM
Describes columns, attributes or array elements in a database that are of type INTERVAL YEAR TO MONTH.
DB_TYPE_JSON
Describes columns in a database that are of type JSON (with Oracle Database 21 or later).
DB_TYPE_LONG
Describes columns, attributes or array elements in a database that are of type LONG.
DB_TYPE_LONG_NVARCHAR
This type is used internally to describe columns that are of type DB_TYPE_NCLOB but are being returned as string data instead of a LOB locator.
DB_TYPE_LONG_RAW
Describes columns, attributes or array elements in a database that are of type LONG RAW.
DB_TYPE_NCHAR
Describes columns, attributes or array elements in a database that are of type NCHAR.
DB_TYPE_NCLOB
Describes columns, attributes or array elements in a database that are of type NCLOB.
DB_TYPE_NUMBER
Describes columns, attributes or array elements in a database that are of type NUMBER.
DB_TYPE_NVARCHAR
Describes columns, attributes or array elements in a database that are of type NVARCHAR2.
DB_TYPE_OBJECT
Describes columns, attributes or array elements in a database that are an instance of a named SQL or PL/SQL type.
DB_TYPE_RAW
Describes columns, attributes or array elements in a database that are of type RAW.
DB_TYPE_ROWID
Describes columns, attributes or array elements in a database that are of type ROWID.
DB_TYPE_TIMESTAMP
Describes columns, attributes or array elements in a database that are of type TIMESTAMP.
DB_TYPE_TIMESTAMP_LTZ
Describes columns, attributes or array elements in a database that are of type TIMESTAMP WITH LOCAL TIME ZONE.
DB_TYPE_TIMESTAMP_TZ
Describes columns, attributes or array elements in a database that are of type TIMESTAMP WITH TIME ZONE.
DB_TYPE_UNKNOWN
Describes columns, attributes or array elements in a database that are of an unknown type.
DB_TYPE_UROWID
Describes columns, attributes or array elements in a database that are of type UROWID.
DB_TYPE_VARCHAR
Describes columns, attributes or array elements in a database that are of type VARCHAR2.
DB_TYPE_VECTOR
Describes columns, attributes or array elements in a database that are of type VECTOR (with Oracle Database 26ai or later).
DB_TYPE_XMLTYPE
Describes columns, attributes or array elements in a database that are of type SYS.XMLTYPE.
PURITY_NEW
This constant is used to specify that the session acquired from the pool should be new and not have any prior session state.
PURITY_SELF
This constant is used to specify that the session acquired from the pool need not be new and may have prior session state.

Traits§

FromDbValue
Trait which transforms database values from the format required by the database to ones usable by applications.
ToDbValue
Trait which transforms values used by applications into the format required by the database.

Functions§

connect
Establish a standalone connection to the database with the given configuration.
create_pool
Creates a new pool with the given configuration.
enquote_literal
Returns the supplied string as a new string that is safe to include as a literal in a SQL statement.
enquote_name
Returns the supplied string as a new string that is safe to include as a quoted name in a SQL statement. Since embedded quotes are not allowed in quoted identifiers, an error is returned if embedded quotes are detected. If the capitalize parameter is true, the string is converted to uppercase.
is_qualified_sql_name
Returns a boolean indicating if the supplied string contains a valid qualified SQL name. Leading and trailing spaces are ignored. The name must be one or more simple SQL names separated by periods (and any amount of whitespace), optionally followed by the ‘@’ symbol and an additional simple SQL name referring to a database link name.
is_simple_sql_name
Returns a boolean indicating if the supplied string contains a valid simple SQL name. Leading and trailing spaces are ignored. If the value is not quoted, the first character must be alphabetic and the remaining characters must be alphanumeric or contain the characters ‘_’, ‘$’ or ‘#’. A quoted name may not contain embedded quotes and no characters other than whitespace are allowed outside the quotes.