{"id":22726774,"url":"https://github.com/tom-sherman/kysely-d1-api","last_synced_at":"2025-04-13T20:47:13.294Z","repository":{"id":64371676,"uuid":"568563149","full_name":"tom-sherman/kysely-d1-api","owner":"tom-sherman","description":"So you can use kysely with d1 outside of cloudflare workers.","archived":false,"fork":false,"pushed_at":"2022-11-20T22:46:31.000Z","size":3,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T20:47:04.444Z","etag":null,"topics":["cloudflare-workers","d1","deno","sqlite"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tom-sherman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-20T22:44:19.000Z","updated_at":"2023-05-17T04:22:53.000Z","dependencies_parsed_at":"2023-01-15T14:15:32.733Z","dependency_job_id":null,"html_url":"https://github.com/tom-sherman/kysely-d1-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-sherman%2Fkysely-d1-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-sherman%2Fkysely-d1-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-sherman%2Fkysely-d1-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-sherman%2Fkysely-d1-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tom-sherman","download_url":"https://codeload.github.com/tom-sherman/kysely-d1-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248782279,"owners_count":21160716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudflare-workers","d1","deno","sqlite"],"created_at":"2024-12-10T16:18:31.481Z","updated_at":"2025-04-13T20:47:13.246Z","avatar_url":"https://github.com/tom-sherman.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kysely d1 api driver\n\nSo you can use kysely with d1 outside of cloudflare workers.\n\n\u003e **Warning**: This is just a proof of concept. See discussion at https://github.com/aidenwallis/kysely-d1/issues/7 for more info.\n\n```ts\nexport interface BlogPostsTable {\n  Slug: ColumnType\u003cstring\u003e;\n  Title: ColumnType\u003cstring\u003e;\n}\n\ninterface Database {\n  BlogPosts: BlogPostsTable;\n}\n\nconst db = new Kysely\u003cDatabase\u003e({\n  dialect: new D1APIDialect({\n    accountId: D1_ACCOUNT_ID,\n    apiKey: D1_API_KEY,\n    databaseName: D1_DB_NAME,\n  }),\n});\n\nconst result = await db.selectFrom(\"BlogPosts\").select(\"BlogPosts.Title\")\n  .executeTakeFirstOrThrow();\n\nconsole.log(result);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftom-sherman%2Fkysely-d1-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftom-sherman%2Fkysely-d1-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftom-sherman%2Fkysely-d1-api/lists"}