PreparedStatement class

Wrapper for prepared statement operations.

Provides convenient methods to execute prepared statements with parameters and close them when done.

Example:

final stmt = PreparedStatement(backend, stmtId);
final result = stmt.execute([ParamValueString('value')]);
stmt.close();

Constructors

PreparedStatement(OdbcConnectionBackend _backend, int _stmtId, {List<String>? paramNamesForNamedExecution})
Creates a new PreparedStatement instance.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stmtId int
The prepared statement identifier.
no setter

Methods

close() → void
Closes and releases a prepared statement.
execute({List<ParamValue>? params, int timeoutOverrideMs = 0, int fetchSize = 1000, int? maxBufferBytes}) Uint8List?
Executes prepared statement with optional parameters.
executeNamed({required Map<String, Object?> namedParams, int timeoutOverrideMs = 0, int fetchSize = 1000, int? maxBufferBytes}) Uint8List?
Executes with named parameters.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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