| 56 | |
| 57 | // This nested class is instantiated each time a virtual table is scanned. |
| 58 | class Cursor { friend class CustomTable; |
| 59 | static inline CustomTable::Cursor* Upcast(sqlite3_vtab_cursor* cursor) { |
| 60 | return reinterpret_cast<Cursor*>(cursor); |
| 61 | } |
| 62 | |
| 63 | inline sqlite3_vtab_cursor* Downcast() { |
| 64 | return reinterpret_cast<sqlite3_vtab_cursor*>(this); |
| 65 | } |
| 66 | |
| 67 | inline CustomTable::VTab* GetVTab() { |
| 68 | return VTab::Upcast(base.pVtab); |
| 69 | } |
| 70 | |
| 71 | sqlite3_vtab_cursor base; |
| 72 | Napi::ObjectReference iterator; |
| 73 | Napi::FunctionReference next; |
| 74 | Napi::Reference<Napi::Array> row; |
| 75 | bool done; |
| 76 | sqlite_int64 rowid; |
| 77 | }; |
| 78 | |
| 79 | // This nested class is used by Data::ResultValueFromJS to report errors. |
| 80 | class TempDataConverter : DataConverter { friend class CustomTable; |
nothing calls this directly
no outgoing calls
no test coverage detected