-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Cloudflare D1 driver #39
Comments
If it helps, there's this other REPO that serves as a "D1 browser" of sorts: I very much prefer this (libsql) interface however. Would love to also open and edit local .sqlite files so I don't have to use https://sqliteviewer.app/ (which actually doesn't allow editing), but I see there's an issue for that too I think ( #70 ). |
LibSQL Studio can also open .sqlite file. We have SQLite playground You can click open or drag file in. For Cloudflare D1, it shouldn't be difficult to implement, just we are not sure if there is high demand for this Cloudflare D1. The only challenge is CORS. But we can bypass it by proxy the request via our server. Look like, it is time to get my hand dirty with Cloudflare D1 driver for our editor |
I just tested it out! Few things:
Despite those nuances, this was good enough that I'll start using it instead of sqliteviewer moving forward :) and obviously recommend it to other folks too. As far as D1 goes, it would make my day good sir <3 I hope one day I am able to pay it back ^^ I love FOSS and I'd love to reach a position where I can support these projects :) |
What are you trying to drag that open new tab?
This is limitation of the browser (for security reason). The only way to workaround is to make it as browser extension which allows to save back to opened file.
Let me try to finish the D1 this weekend. It shouldn't be hard to implement |
A .sqlite file (a local SQLite DB).
Makes sense I think, thanks for explaining 🙏 I think the 'extension workaround' is what Google did so people could work on their G. Docs, etc. offline.
There's no rush to it, but I'd be super happy about it for sure ^^
Other than that I'm not sure if there are other ways that don't involve a wrapper (that would need a native way to connect anyway, so would be pointless). |
We will use API Key which is how TablePlus and Dataflare are using. |
For save directly to file when open local SQLite file. I saw this https://developer.chrome.com/docs/capabilities/web-apis/file-system-access maybe it is possible |
@Chinoman10 Cloudflare driver is done. It will be available in the next release which will be on Monday 22th this month. |
Just wanted to say that I tried it out today with a few D1 DBs and so far the experience has been great, thank you so much for building this out! Feel free to let me know how I can further support this project beyond giving a star on this repo and spreading the word :) |
@Chinoman10 for editing local sqlite, I also make some improvement |
You should tag https://x.com/libsqlstudio on your profile, and make more posts from that account :) Also, I did try opening a local SQLite DB first, but for some reason it isn't working for me.
Could it be something browser specific? I'm using Brave. Console log shows:
|
@Chinoman10 Brave for some reason does not support https://developer.mozilla.org/en-US/docs/Web/API/FileSystemHandle I think I need to do fallback for browser that does not support this one. Safari, Chrome, Edge and Firefox support this already. I will investigate which other browser that does not support. |
Brave does support it but you need to enable the flag |
Perfect! <insert chef's kiss meme> ( I have one last question (off-topic for this issue tho): will you consider adding Postgres as well someday? We're currently using Adminer and it feels like I'm using a decades old product... and I think it's done in PHP too 🤮 ) |
@Chinoman10 LibSQL Studio is very new. (6~7 months old). So we need to catch up with other GUI in term of feature first before we expand to more drivers. The good thing is that I used to write PostgreSQL/MySQL GUI (https://github.com/querymx/querym) before as well, so when I want to implement those driver, I will have some existing code before. ^^ |
That's pretty dope! I might download that one and give it a shot when I feel frustrated about Adminer again 😅 |
No description provided.
The text was updated successfully, but these errors were encountered: