Commit Detail
Commit aa744f9
SQLite: Refactor how column names are cached. We now clean up queries more eagerly, but until now `.columnNames` couldn't be accessed after cleanup. This broke D1 tests. Additionally, I had forgotten to actually store the cached column names along with the cached stament (I created a CachedColumnNames object in CachedStatement but never used it!). This change makes it so "cached column names" is just a JsArray rather than a C++ object. We can then more easily hold onto it past the end of the query. Code also generally gets simpler. One caveat is that we must initialize the column names at the start of the query rather than lazily. This is because we cannot predict in advance whether `.columnNames` will be accessed after the query ends. So, we always need a copy of column names just in case.
Files changed
3 files changed~3 modified