OdbcService class
High-level ODBC service that provides simplified API for database operations.
This service wraps IOdbcRepository to provide a more convenient interface for common database operations.
Usage
final service = OdbcService(repository);
await service.initialize();
final result = await service.executeQuery(
'SELECT * FROM users',
connectionId: connection.id,
);
- Implemented types
Constructors
- OdbcService(IOdbcRepository _repository)
- Creates a new OdbcService 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
Methods
-
asyncCancel(
int requestId) → Future< Result< void> > -
override
-
asyncFree(
int requestId) → Future< Result< void> > -
override
-
asyncGetResult(
int requestId, {int? maxBufferBytes}) → Future< Result< QueryResult> > -
override
-
asyncPoll(
int requestId) → Future< Result< int> > -
override
-
beginTransaction(
String connectionId, {IsolationLevel? isolationLevel}) → Future< Result< int> > -
override
-
bulkInsert(
String connectionId, String table, List< String> columns, List<int> dataBuffer, int rowCount) → Future<Result< int> > -
override
-
bulkInsertParallel(
int poolId, String table, List< String> columns, List<int> dataBuffer, int rowCount, {int parallelism = 0}) → Future<Result< int> > -
override
-
cancelStatement(
String connectionId, int stmtId) → Future< Result< void> > -
override
-
cancelStream(
int streamId) → Future< Result< void> > -
override
-
catalogColumns(
String connectionId, String table) → Future< Result< QueryResult> > -
override
-
catalogTables(
{required String connectionId, String catalog = '', String schema = ''}) → Future< Result< QueryResult> > -
override
-
catalogTypeInfo(
String connectionId) → Future< Result< QueryResult> > -
override
-
clearAuditEvents(
) → Future< Result< void> > -
override
-
clearMetadataCache(
) → Future< Result< void> > -
override
-
clearStatementCache(
) → Future< Result< void> > -
override
-
closeStatement(
String connectionId, int stmtId) → Future< Result< void> > -
override
-
commitTransaction(
String connectionId, int txnId) → Future< Result< void> > -
override
-
connect(
String connectionString, {ConnectionOptions? options}) → Future< Result< Connection> > -
override
-
createSavepoint(
String connectionId, int txnId, String name) → Future< Result< void> > -
override
-
detectDriver(
String connectionString) → Future< String?> -
override
-
disconnect(
String connectionId) → Future< Result< void> > -
override
-
dispose(
) → void -
override
-
executeAsyncStart(
String connectionId, String sql) → Future< Result< int> > -
override
-
executePrepared(
String connectionId, int stmtId, List? params, StatementOptions? options) → Future< Result< QueryResult> > -
override
-
executePreparedNamed(
String connectionId, int stmtId, Map< String, Object?> namedParams, StatementOptions? options) → Future<Result< QueryResult> > -
override
-
executeQuery(
String sql, {List? params, String? connectionId}) → Future< Result< QueryResult> > -
override
-
executeQueryMulti(
String connectionId, String sql) → Future< Result< QueryResult> > -
override
-
executeQueryMultiFull(
String connectionId, String sql) → Future< Result< QueryResultMulti> > -
override
-
executeQueryNamed(
String connectionId, String sql, Map< String, Object?> namedParams) → Future<Result< QueryResult> > -
override
-
executeQueryParams(
String connectionId, String sql, List params) → Future< Result< QueryResult> > -
override
-
getAuditEvents(
{int limit = 0}) → Future< Result< List< >Map< >String, Object?> > -
override
-
getAuditStatus(
) → Future< Result< Map< >String, Object?> > -
override
-
getDriverCapabilities(
String connectionString) → Future< Result< Map< >String, Object?> > -
override
-
getMetrics(
) → Future< Result< OdbcMetrics> > -
override
-
getPreparedStatementsMetrics(
) → Future< Result< PreparedStatementMetrics> > -
override
-
getVersion(
) → Future< Result< Map< >String, String> > -
override
-
initialize(
) → Future< Result< void> > -
override
-
isInitialized(
) → bool -
override
-
metadataCacheEnable(
{required int maxEntries, required int ttlSeconds}) → Future< Result< void> > -
override
-
metadataCacheStats(
) → Future< Result< Map< >String, Object?> > -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
poolClose(
int poolId) → Future< Result< void> > -
override
-
poolCreate(
String connectionString, int maxSize) → Future< Result< int> > -
override
-
poolGetConnection(
int poolId) → Future< Result< Connection> > -
override
-
poolGetState(
int poolId) → Future< Result< PoolState> > -
override
-
poolGetStateDetailed(
int poolId) → Future< Result< Map< >String, Object?> > -
override
-
poolHealthCheck(
int poolId) → Future< Result< bool> > -
override
-
poolReleaseConnection(
String connectionId) → Future< Result< void> > -
override
-
prepare(
String connectionId, String sql, {int timeoutMs = 0}) → Future< Result< int> > -
override
-
prepareNamed(
String connectionId, String sql, {int timeoutMs = 0}) → Future< Result< int> > -
override
-
releaseSavepoint(
String connectionId, int txnId, String name) → Future< Result< void> > -
override
-
rollbackToSavepoint(
String connectionId, int txnId, String name) → Future< Result< void> > -
override
-
rollbackTransaction(
String connectionId, int txnId) → Future< Result< void> > -
override
-
setAuditEnabled(
{required bool enabled}) → Future< Result< void> > -
override
-
streamPollAsync(
int streamId) → Future< Result< int> > -
override
-
streamQuery(
String connectionId, String sql) → Stream< Result< QueryResult> > -
override
-
streamStartAsync(
String connectionId, String sql, {int fetchSize = 1000, int chunkSize = 64 * 1024}) → Future< Result< int> > -
override
-
toString(
) → String -
A string representation of this object.
inherited
-
validateConnectionString(
String connectionString) → Future< Result< void> > -
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited