load_extension method

int load_extension(
  1. PtrSqlite3 db,
  2. String zFile,
  3. String? zProc,
  4. PtrPtrUtf8 pzErrMsg,
)
inherited

Implementation

int load_extension(PtrSqlite3 db, String zFile, String? zProc, PtrPtrUtf8 pzErrMsg) {
  final zFileMeta = zFile._metaNativeUtf8();
  final ptrZFile = zFileMeta.ptr;
  final zProcMeta = zProc?._metaNativeUtf8();
  final ptrZProc = zProcMeta?.ptr ?? ffi.nullptr;
  try {
    return _h_sqlite3_load_extension(db, ptrZFile, ptrZProc, pzErrMsg);
  } finally {
    pkgffi.malloc.free(ptrZFile);
    pkgffi.malloc.free(ptrZProc);
  }
}