prepare method

int prepare(
  1. PtrSqlite3 db,
  2. String zSql,
  3. PtrPtrStmt ppStmt,
  4. PtrPtrUtf8 pzTail,
)
inherited

Implementation

int prepare(PtrSqlite3 db, String zSql, PtrPtrStmt ppStmt, PtrPtrUtf8 pzTail) {
  final zSqlMeta = zSql._metaNativeUtf8();
  final ptrZSql = zSqlMeta.ptr;
  try {
    var result = _h_sqlite3_prepare(db, ptrZSql, zSqlMeta.length, ppStmt, pzTail);
    if (pzTail.value.address - ptrZSql.address == zSqlMeta.length) {
      pzTail.value = ffi.nullptr;
    }
    return result;
  } finally {
    pkgffi.malloc.free(ptrZSql);
  }
}