openCursor method
IResultSet
openCursor(
- IStatus status,
- ITransaction transaction,
- String sqlStmt, [
- int dialect = FbConsts.sqlDialectCurrent,
- IMessageMetadata? inMetadata,
- Pointer<
Uint8> ? inBuffer, - IMessageMetadata? outMetadata,
- String? cursorName,
- int cursorFlags = 0,
Implementation
IResultSet openCursor(
IStatus status, ITransaction transaction, String sqlStmt,
[int dialect = FbConsts.sqlDialectCurrent,
IMessageMetadata? inMetadata,
Pointer<Uint8>? inBuffer,
IMessageMetadata? outMetadata,
String? cursorName,
int cursorFlags = 0]) {
final sqlUtf = sqlStmt.toNativeUtf8(allocator: mem);
try {
final nameUtf = cursorName?.toNativeUtf8(allocator: mem) ?? nullptr;
try {
final res = _openCursor(
self,
status.self,
transaction.self,
0,
sqlUtf,
dialect,
inMetadata?.self ?? nullptr,
inBuffer ?? nullptr,
outMetadata?.self ?? nullptr,
nameUtf,
cursorFlags);
status.checkStatus();
return IResultSet(res);
} finally {
if (nameUtf != nullptr) {
mem.free(nameUtf);
}
}
} finally {
mem.free(sqlUtf);
}
}