aidenwallis / kysely-d1

D1 dialect for Kysely
MIT License
206 stars 12 forks source link

D1 API dialect #7

Open tom-sherman opened 1 year ago

tom-sherman commented 1 year ago

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

tom-sherman commented 1 year ago

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.

aidenwallis commented 1 year ago

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

aidenwallis commented 1 year ago

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!

tom-sherman commented 1 year ago

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 👍

aidenwallis commented 1 year ago

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?

ngraef commented 5 months ago

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

aidenwallis commented 5 months ago

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. 👍