how do you make this work, are you
how do you make this work, are you deploying a worker inside the account to act as a proxy?
5 Replies
i'm interested on this as well. It seems that if this is possible, it should be possible to connect to others DB visualizers as well
does it use JDBC URL connections?
We're using an OAuth integration with Cloudflare on the cloud version of Outerbase where we've partnered with them it ~ a year ago to list your databases and have the ability to run queries against them if you approve it.
With the open source version you can get a sense of how we do it here with their public API: https://github.com/outerbase/sdk/blob/main/src/connections/sqlite/cloudflare.ts
GitHub
sdk/src/connections/sqlite/cloudflare.ts at main · outerbase/sdk
Typescript ORM and automated model generation direct from your database schema. Supports Outerbase features for saved queries & AI. - outerbase/sdk
Not against this for debugging purposes, but keep in mind going through the REST API is still an order of magnitude slower than having a worker proxy. We are working on fixing that soon, but just in case you wonder why your queries are 1-2s over the REST API.
what's this worker proxy? are there any docs for that? i did a quick search but didn't find anything useful
Use a worker with a binding to your D1 database, and expose anything you need through that worker that uses the D1 binding for the queries