| 910 | typename Functions |
| 911 | > |
| 912 | inline void step( |
| 913 | sqlite3_context* db, |
| 914 | int count, |
| 915 | sqlite3_value** vals |
| 916 | ) { |
| 917 | auto ctxt = static_cast<AggregateCtxt<ContextType>*>(sqlite3_aggregate_context(db, sizeof(AggregateCtxt<ContextType>))); |
| 918 | if(!ctxt) return; |
| 919 | try { |
| 920 | if(!ctxt->constructed) new(ctxt) AggregateCtxt<ContextType>(); |
| 921 | step<Count, Functions>(db, count, vals, ctxt->obj); |
| 922 | return; |
| 923 | } catch(sqlite_exception &e) { |
| 924 | sqlite3_result_error_code(db, e.get_code()); |
| 925 | sqlite3_result_error(db, e.what(), -1); |
| 926 | } catch(std::exception &e) { |
| 927 | sqlite3_result_error(db, e.what(), -1); |
| 928 | } catch(...) { |
| 929 | sqlite3_result_error(db, "Unknown error", -1); |
| 930 | } |
| 931 | if(ctxt && ctxt->constructed) |
| 932 | ctxt->~AggregateCtxt(); |
| 933 | } |
| 934 | |
| 935 | template< |
| 936 | std::size_t Count, |
nothing calls this directly
no test coverage detected