serialize method

Pointer<Uint8>? serialize(
  1. PtrSqlite3 db,
  2. String zSchema,
  3. PtrInt64 piSize,
  4. int mFlags,
)
inherited

Implementation

ffi.Pointer<ffi.Uint8>? serialize(PtrSqlite3 db, String zSchema, PtrInt64 piSize, int mFlags) {
  if (libVersionNumber < 3023000) {
    throw dbsql.DatabaseException('API sqlite3_serialize is not available before 3.23.0');
  }
  final zSchemaMeta = zSchema._metaNativeUtf8();
  final ptrZSchema = zSchemaMeta.ptr;
  try {
    var result = _h_sqlite3_serialize!(db, ptrZSchema, piSize, mFlags);
    return result == ffi.nullptr ? null : result;
  } finally {
    pkgffi.malloc.free(ptrZSchema);
  }
}