| 37 | private: |
| 38 | |
| 39 | static inline void xStepBase(sqlite3_context* invocation, int argc, sqlite3_value** argv, const Napi::FunctionReference CustomAggregate::*ptrtm) { |
| 40 | AGGREGATE_START(); |
| 41 | |
| 42 | napi_value args_fast[5]; |
| 43 | napi_value* args = argc <= 4 ? args_fast : ALLOC_ARRAY<napi_value>(argc + 1); |
| 44 | args[0] = acc->value.Value(); |
| 45 | if (argc != 0) Data::GetArgumentsJS(env, args + 1, argv, argc, self->safe_ints); |
| 46 | |
| 47 | Napi::Value returnValue = SafeCall(env, (self->*ptrtm).Value(), env.Undefined(), argc + 1, args); |
| 48 | if (args != args_fast) delete[] args; |
| 49 | |
| 50 | if (env.IsExceptionPending()) { |
| 51 | self->PropagateJSError(invocation); |
| 52 | } else { |
| 53 | if (!returnValue.IsUndefined()) acc->value.Reset(returnValue, 1); |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | static inline void xValueBase(sqlite3_context* invocation, bool is_final) { |
| 58 | AGGREGATE_START(); |
nothing calls this directly
no test coverage detected