snapshot_get method

int snapshot_get(
  1. PtrSqlite3 db,
  2. String zSchema,
  3. PtrPtrSnapshot ppSnapshot
)
inherited

Implementation

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