OracleConnection class

Constructors

OracleConnection.fromPool(DpiOracle dpiOracle, Pointer<dpiContext> context, Pointer<Pointer<dpiConn>> connectionPtr, OracleConfig config, MemoryManager memoryManager)
Internal factory for creating connections from pool This is used by OracleConnectionPool to create connections
factory

Properties

autocommit bool
Get the current autocommit mode.
no setter
config OracleConfig
no setter
hashCode int
The hash code for this object.
no setterinherited
isConnected bool
no setter
isDisposed bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

breakExecution() Future<void>
Interrupt the currently executing database operation.
callproc(String name, {List? parameters, Map<String, OracleVariable>? keywordParameters}) Future<List>
Call a stored procedure or function with IN and OUT parameters.
changePassword({required String oldPassword, required String newPassword}) Future<void>
Change the password for the connected user.
close() Future<void>
Close the connection and release all resources.
commit() Future<void>
Commit the current transaction, making all changes permanent.
createLob(LobType lobType) Future<OracleLob>
Create a temporary Large Object (LOB) for storing large data.
createVar({required int oracleType, required int nativeType, int size = 0, int arraySize = 1, BindDirection direction = BindDirection.output}) Future<OracleVariable>
Create a bind variable for OUT or IN/OUT parameters.
execute(String sql, {List? params, Map<String, dynamic>? namedParams}) Future<OracleStatement>
Execute a SQL statement and return a statement object for iteration.
executeUpdate(String sql, {List? params, Map<String, dynamic>? namedParams}) Future<int>
Execute a DML statement (INSERT, UPDATE, DELETE) and return rows affected.
getCurrentSchema() Future<String>
Get the current schema name for this connection.
getEdition() Future<String>
Get the Oracle Database edition name.
getEncodingInfo() Future<Map<String, dynamic>>
Get character encoding information for this connection.
getServerVersion() Future<String>
Get the Oracle Database server version string.
getStmtCacheSize() Future<int>
Get the current statement cache size.
inOutInteger() Future<OracleVariable>
Create an IN/OUT Integer parameter (user-friendly helper)
inOutNumber() Future<OracleVariable>
Create an IN/OUT Number parameter (user-friendly helper)
inOutString({int maxSize = 4000}) Future<OracleVariable>
Create an IN/OUT String parameter (user-friendly helper)
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
outBoolean() Future<OracleVariable>
Create a Boolean OUT parameter (user-friendly helper)
outDate() Future<OracleVariable>
Create a Date/Timestamp OUT parameter (user-friendly helper)
outInteger() Future<OracleVariable>
Create an Integer OUT parameter (user-friendly helper)
outNumber() Future<OracleVariable>
Create a Number (double) OUT parameter (user-friendly helper)
outRefCursor() Future<OracleVariable>
Create a REF CURSOR OUT parameter (user-friendly helper)
outString({int maxSize = 4000}) Future<OracleVariable>
Create a String OUT parameter (user-friendly helper)
ping() Future<bool>
Check if the database connection is still alive.
prepare(String sql, {bool scrollable = false}) Future<OracleStatement>
Prepare a SQL statement without executing it.
query(String sql, {List? params, Map<String, dynamic>? namedParams}) Future<List<Map<String, dynamic>>>
Execute a query and return all rows as a list.
rollback() Future<void>
Rollback the current transaction, discarding all uncommitted changes.
setAction(String action) Future<void>
Set action name for end-to-end application tracing.
setAutocommit(bool enabled) Future<void>
Set the autocommit mode.
setClientIdentifier(String clientId) Future<void>
Set client identifier for end-to-end application tracing.
setClientInfo(String clientInfo) Future<void>
Set client information for end-to-end application tracing.
setCurrentSchema(String schema) Future<void>
Set the current schema for this connection.
setDbOp(String dbOp) Future<void>
Set database operation name for end-to-end tracing.
setModule(String module) Future<void>
Set module name for end-to-end application tracing.
setStmtCacheSize(int size) Future<void>
Set the statement cache size.
setTransactionIsolation(TransactionIsolation isolation) Future<void>
Set the transaction isolation level for the next transaction.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

connect({required DpiOracle dpiOracle, required Pointer<dpiContext> context, required OracleConfig config}) Future<OracleConnection>
Create and open a connection to Oracle database