createBatch method
IBatch
createBatch(
- IStatus status,
- ITransaction transaction,
- String sqlStmt, [
- int dialect = FbConsts.sqlDialectCurrent,
- IMessageMetadata? inMetadata,
- int parLength = 0,
- Pointer<
Uint8> ? par,
Implementation
IBatch createBatch(IStatus status, ITransaction transaction, String sqlStmt,
[int dialect = FbConsts.sqlDialectCurrent,
IMessageMetadata? inMetadata,
int parLength = 0,
Pointer<Uint8>? par]) {
if (version < 4) {
throw UnimplementedError(
"Firebird client library version 4 or later required.");
}
final sqlUtf = sqlStmt.toNativeUtf8(allocator: mem);
try {
final res = _createBatch(self, status.self, transaction.self, 0, sqlUtf,
dialect, inMetadata?.self ?? nullptr, parLength, par ?? nullptr);
status.checkStatus();
return IBatch(res);
} finally {
mem.free(sqlUtf);
}
}