kysely-d1 icon indicating copy to clipboard operation
kysely-d1 copied to clipboard

D1 API dialect

Open tom-sherman opened this issue 3 years ago • 7 comments

A D1 API dialect would be cool, it would allow you use kysely in node or deno to work with D1 databases

tom-sherman avatar Nov 18 '22 12:11 tom-sherman

I've created a POC implementation here: https://github.com/tom-sherman/kysely-d1-api

Let me know if you think this is something that could be included in this lib and I'll be happy to clean it up and open a pull request. If not no worries, I can publish it as a complimentary library.

The API is currently undocumented/internal/private, although will be open and stable in the future I'm sure. I think it's worth including in the package and marking as unstable: unstable_D1ApiDialiect or something.

tom-sherman avatar Nov 20 '22 22:11 tom-sherman

I think we can merge this in, can you open a PR and I can check it out then?

aidenwallis avatar Nov 21 '22 10:11 aidenwallis

Apologies for completely missing the second part of that, if the API is not formally supported by Cloudflare, I don't want to merge it in here and encourage use of APIs that they may not want people using. I'm happy to revisit this when/if they document the API for this!

aidenwallis avatar Nov 21 '22 18:11 aidenwallis

Cloudflare are happy for users to use this API, they even promoted a tool using it in the open alpha blog post. It's just unstable and doesn't have documentation.

Totally get the point about only shopping stable APIs in this library though 👍

tom-sherman avatar Nov 21 '22 19:11 tom-sherman

Yeah, I think we should totally work on adding this FWIW and would like to combine it into this library!

I just don't want to risk shipping a library that breaks for people randomly, lets keep this open and revisit merging the two projects once the API is documented?

aidenwallis avatar Nov 22 '22 22:11 aidenwallis

Any interest in picking this back up now that the D1 REST API is public, stable, and documented?

ngraef avatar Apr 30 '24 23:04 ngraef

If someone picks up a PR or submits another, I'm happy to take a look and hopefully merge. To be a little transparent, i don't really use this package at all anymore and have been extremely busy with work, but will try to look at this when I have time. Thank you for bearing with me and sorry for the delays. 👍

aidenwallis avatar May 05 '24 01:05 aidenwallis