snapshot_open method

int snapshot_open(
  1. PtrSqlite3 db,
  2. String zSchema,
  3. PtrSnapshot pSnapshot
)
inherited

Implementation

int snapshot_open(PtrSqlite3 db, String zSchema, PtrSnapshot pSnapshot) {
  if (libVersionNumber < 3010000) {
    throw dbsql.DatabaseException('API sqlite3_snapshot_open is not available before 3.10.0');
  }
  final zSchemaMeta = zSchema._metaNativeUtf8();
  final ptrZSchema = zSchemaMeta.ptr;
  if (_h_sqlite3_snapshot_open! == null) {
    throw dbsql.DatabaseException(
        'API sqlite3_snapshot_open is not available, You need to enable it during library build.');
  }
  try {
    return _h_sqlite3_snapshot_open!(db, ptrZSchema, pSnapshot);
  } finally {
    pkgffi.malloc.free(ptrZSchema);
  }
}