Skip to content
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

Add API Dialect #12

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

tom-sherman
Copy link
Contributor

@tom-sherman tom-sherman commented Nov 21, 2022

  • I have verified my changes didn't break the example project.

Description

Closes #7

This PR adds a new dialect that allows you to Kysely and D1 outside of cloudflare workers eg. in Deno and Node.

Note
I'd recommend not squashing these changes as I've structured the commits to preserve the history/renaming of index.ts -> d1-dialect.ts

This is so that git can track the rename in preperation of adding an index.ts barrel module
This is in preperation for a seperate D1 API dialect
throw new Error('D1 Driver does not support streaming');
}
}
// Marked as unstable as the D1 HTTP API is currently undocumented and may change.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the API is undocumented, I likely will not add support for this until Cloudflare formally document it. 👍

@aidenwallis
Copy link
Owner

@tom-sherman I'm thinking we should maybe consider closing this PR branch until there's official API support for this from Cloudflare.

We can keep an issue open to track this, if that works for you! 👍

@aidenwallis
Copy link
Owner

Did this API ever get documented?

@adam-the
Copy link

I think that it could be worthwhile adding this, even if the APIs aren't documented yet. In their Discord server, Cloudflare has committed to eventually documenting/stabilising the API and even endorse projects made around it such as this one: https://github.com/isaac-mcfadyen/d1-console

Accepting this pull request will allow for easier access for those who wish to experiment with it and enable anyone to submit maintenance changes for the feature in this project going forward.

return databases;
}

async databseFromName(name: string) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*database

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

D1 API dialect
3 participants