Version 0.1 (initial release)
🗃️ x/database/sql for Deno, Version 0.1
📝 Design (status: under revision ⏳): read as HTML or review as Markdown.
⚙️ Implementation (status: incomplete ⏳): view tree, view deno doc (driver.ts, sql.ts), or review files.
I have requested feedback 👀 on the design from @caspervonb, @dyedgreen, @NickSavage, and @halvardssm, and unlocked this repository for comments 😨.
Hi @jeremyBanks ! Last week has been busy at work, so I haven't had time to check in much. How is the current status, what are the current blockers, and how can I assist?
@halvardssm 👋 Hello!
Summary:
- Initial implementation is somewhat complete and functional, except for the Postgres driver, which is not implemented.
- The doc hasn't yet been updated to reflect changes this week.
- After a bit more testing (maybe today, maybe within the next couple of days) I'd like to tag a prerelease with what I've got so that folks can try it out.
- I'd like to update the
.devcontainerconfig and GitHub actions config to include a Postgres server, so we can also run unit tests against it. - We now describe exactly what errors we expect drivers to raise, and which errors our library is expected to raise. They're still pretty vague, but they were previously unspecified.
I don't think there are any blockers, but I'd appreciate some feedback on this design question, or anything else you think we're missing:
I've gone back and forth on how to handle .close()ing connections when there are open transactions (and similarly, closing transactions when there are open cursors). I was initially planning to have .close() block until everything was done, but I've decided it's probably better to have to it immediately close everything, because that's more likely to be what you want if you call .close(). In order to let Connection.close() cancel everything, to prevent any more requests from being made to the driver, I've had to pass a chain of "context" objects along to propagate the cancellation. (I'm not sure about this design, but I'm probably willing to accept it for now since it's just an internal implementation detail, the contexts aren't exposed to users yet.) This has been implemented, and seems to be working for SQLite, but I haven't tested or exercised it much yet.
I've described down some of the remaining implementation work in more-specific issues: #5, #6, #7, #8. I may not have time to do much work on it before next weekend.
Hi @jeremyBanks ! Just wondered if you are still interested in working on this? I have some time again, and I would be willing to put some effort into getting this through. What is the current status/blocker? 😃