create_function_v2 method

int create_function_v2(
  1. PtrSqlite3 db,
  2. String zFunctionName,
  3. int nArg,
  4. int eTextRep,
  5. PtrVoid pApp,
  6. PtrDefpxFunc xFunc,
  7. PtrDefpxFunc xStep,
  8. PtrDefxFinal xFinal,
  9. PtrDefxFree xDestroy,
)
inherited

Implementation

int create_function_v2(PtrSqlite3 db, String zFunctionName, int nArg, int eTextRep, PtrVoid pApp,
    PtrDefpxFunc xFunc, PtrDefpxFunc xStep, PtrDefxFinal xFinal, PtrDefxFree xDestroy) {
  if (libVersionNumber < 3007003) {
    throw dbsql.DatabaseException('API sqlite3_create_function_v2 is not available before 3.7.3');
  }
  final zFunctionNameMeta = zFunctionName._metaNativeUtf8();
  final ptrZFunctionName = zFunctionNameMeta.ptr;
  try {
    return _h_sqlite3_create_function_v2!(
        db, ptrZFunctionName, nArg, eTextRep, pApp, xFunc, xStep, xFinal, xDestroy);
  } finally {
    pkgffi.malloc.free(ptrZFunctionName);
  }
}