{"id":40838954,"url":"https://github.com/wirekang/kysely-playground","last_synced_at":"2026-01-21T22:42:08.282Z","repository":{"id":126804399,"uuid":"582498809","full_name":"wirekang/kysely-playground","owner":"wirekang","description":"Playground for kysely, a type-safe sql builder.","archived":false,"fork":false,"pushed_at":"2024-06-09T14:43:05.000Z","size":7352,"stargazers_count":133,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-10T11:42:33.994Z","etag":null,"topics":["kysely","playground","sql","sql-builder","typescript"],"latest_commit_sha":null,"homepage":"https://kyse.link/","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/wirekang.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-27T02:59:59.000Z","updated_at":"2024-06-09T16:24:21.000Z","dependencies_parsed_at":"2024-02-02T01:26:21.044Z","dependency_job_id":"1867a846-ae88-4eb1-84eb-507783c30b21","html_url":"https://github.com/wirekang/kysely-playground","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wirekang/kysely-playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wirekang%2Fkysely-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wirekang%2Fkysely-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wirekang%2Fkysely-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wirekang%2Fkysely-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wirekang","download_url":"https://codeload.github.com/wirekang/kysely-playground/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wirekang%2Fkysely-playground/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28645551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T21:29:11.980Z","status":"ssl_error","status_checked_at":"2026-01-21T21:24:31.872Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["kysely","playground","sql","sql-builder","typescript"],"created_at":"2026-01-21T22:42:07.625Z","updated_at":"2026-01-21T22:42:08.277Z","avatar_url":"https://github.com/wirekang.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# [Kysely Playground](https://kyse.link/)\n\n\nPlayground for [Kysely](https://github.com/kysely-org/kysely),\nwith vscode-like experiences including type checking and auto suggestions.\nSupports built-in dialects, various versions and unrealeased branches.\n\n## Guide\n\nThere are three panels in playground. From left to right, `type-editor`, `query-editor` and `result`.\n\nIn `type-editor` you can declare any kind of typescript types.\nFor Kysely's type-safety and autocompletion to work, `Database` type must be declared with `export`.\nIf you don't familiar with Kysely, checkout [the official guide](https://kysely.dev/docs/getting-started#types) for more information about database types.\n\nIn `query-editor` you can write the query.\n`db` is pre-defined Kysely instance with `Database` type from `type-editor`.\nYou can import any other types from `type-editor`: `import {..} from \"type-editor\"`. \n\nFor advanced usage, you can set the result of `db.*.execute()` by setting `$playground.result`:\n\n```ts\n$playground.result = { rows: [{id:3},{id:4}] };\n$playground.log(await db.selectFrom('person').select(\"id\").execute())\n// [{id:3},{id:4}]\n```\n[Playground Link](https://kyse.link/#cN4IgpgJglgLg9gJwM4gFyhgTwA5jSEAGhAEcBXMBTfAEmwBsBDTAcwTjIDsIA6BMJGXowABAF4RwEewDuSVCIDaUqBAUBmEQF9CkkaoUAWbQF1tAbgA6nOk1bsuvenBYAKRjMawREAEY8kMHowAGMYADF2AFtXSxBcZDhOOIBKAKDQmFiQVVSeMAAPULIYMFcUlKtOEB0QaEZgsPxsOCQYNgEiEABrTED6anQQLFx8GEYWLs5GKLxUEAAGHgAmAHYVmuIAC1UwABUcOZgECi0gA)\n\n\nFor more advanced usage, you can import esm module directly from url:  \n```ts\n// @ts-ignore\nimport isNumber from \"https://esm.run/is-number@7.0.0/index.js\"\n```\n\n[Playground Link](https://kyse.link/#cN4IgpgJglgLg9gJwM4gFyhgTwA5jSEAGhAEcBXMBTfAehoAIABGJAWigHMA7RMAHS5QAttkQx6UJADkyQgEaV6AMwRwh9PiAAWMGNiSo6YJEIB0CMlxqTWXWQoSMA7KYAMb61whgAHqYBWSJoA3AIAJNgANgCGmByqlhCmkXAcABSSMvKUaQDMAJSEEtL2OZrRmvn5oVwgAL7E0NGRYADGMPiiSDDxxkQgANaYSGCR1OggWLj4MNEc-VzRQnioIO4ATC7r9cRaUN4AKjgrMBZgdUA)\n\n\n\n## API\n\nYou can embed the playground in your site. See [kysely.dev](https://kysely.dev/docs/examples/SELECT/a-single-column)\n\n### URL Fragment\n\nSet initial [State](https://github.com/wirekang/kysely-playground/tree/main/src/lib/state/state.ts) via url fragment.\n\n```js\nconst state = {\n  dialect: \"postgres\",\n  editors: {\n    type: \"// type editor contents\",\n    query: \"// query editor contents\",\n  },\n}\nconst fragment = \"r\" + encodedURIComponent(JSON.stringify(state))\nconst url = \"https://kyse.link\" + fragment\n```\n\n\n### SearchParams\n\nThere are some extra flags mostly for iframe.\nNote that when user opens a new tab by 'open-in-new-tab' button, all SearchParams are removed.\n\n| key | value | description |\n|--|--|--|\n| open | any | show floating 'open-in-new-tab' button\n| theme |  'light' \\| 'dark'  | override theme\n| nomore | any | hide 'More' button\n| notheme | any | hide 'switch-theme' button\n| nohotkey | any | disable all hotkeys\n\n\nExample: `https://kyse.link?theme=dark\u0026open=1\u0026theme=dark`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwirekang%2Fkysely-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwirekang%2Fkysely-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwirekang%2Fkysely-playground/lists"}