{"id":14563818,"url":"https://github.com/tursodatabase/kysely-libsql","last_synced_at":"2025-04-09T22:12:16.235Z","repository":{"id":101214139,"uuid":"609063430","full_name":"tursodatabase/kysely-libsql","owner":"tursodatabase","description":"Kysely dialect for sqld","archived":false,"fork":false,"pushed_at":"2024-10-23T09:34:56.000Z","size":123,"stargazers_count":61,"open_issues_count":10,"forks_count":9,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-09T22:12:12.377Z","etag":null,"topics":["kysely","kysely-dialect","libsql","sqlite","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tursodatabase.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2023-03-03T09:51:45.000Z","updated_at":"2025-04-01T16:49:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"abfc62d9-e823-4646-8702-f65c917f2736","html_url":"https://github.com/tursodatabase/kysely-libsql","commit_stats":null,"previous_names":["libsql/kysely-libsql"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tursodatabase%2Fkysely-libsql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tursodatabase%2Fkysely-libsql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tursodatabase%2Fkysely-libsql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tursodatabase%2Fkysely-libsql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tursodatabase","download_url":"https://codeload.github.com/tursodatabase/kysely-libsql/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119294,"owners_count":21050755,"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":["kysely","kysely-dialect","libsql","sqlite","typescript"],"created_at":"2024-09-07T02:05:26.896Z","updated_at":"2025-04-09T22:12:16.208Z","avatar_url":"https://github.com/tursodatabase.png","language":"TypeScript","funding_links":[],"categories":["typescript"],"sub_categories":[],"readme":"# kysely-libsql\n\nA [Kysely][kysely] dialect for [libSQL][libsql], compatible with [@libsql/client][libsql-client-ts].\n\n[kysely]: https://github.com/koskimas/kysely\n[libsql]: https://github.com/tursodatabase/libsql\n\n## Installation\n\n```shell\nnpm install @libsql/kysely-libsql\n```\n\n## Usage\n\nPass a `LibsqlDialect` instance as the `dialect` when creating the `Kysely` object:\n\n```typescript\nimport { Kysely } from \"kysely\";\nimport { LibsqlDialect } from \"@libsql/kysely-libsql\";\n\ninterface Database {\n    ...\n}\n\nconst db = new Kysely\u003cDatabase\u003e({\n    dialect: new LibsqlDialect({\n        url: \"libsql://localhost:8080?tls=0\",\n        authToken: \"\u003ctoken\u003e\", // optional\n    }),\n});\n```\n\nInstead of a `url`, you can also pass an existing `Client` from [`@libsql/client`][libsql-client-ts]:\n\n```typescript\nimport { createClient } from \"@libsql/client\";\n\nconst client = createClient({\n    url: \"libsql://localhost:8080\",\n});\n\nconst db = new Kysely\u003cDatabase\u003e({\n    dialect: new LibsqlDialect({ client }),\n});\n\n// after you are done with the `db`, you must close the `client`:\nclient.close();\n```\n\n## Supported Configuration Options\n\nThe library accepts the exact same [options][client-options] as [`@libsql/client`][libsql-client-ts].\n\n[libsql-client-ts]: https://github.com/tursodatabase/libsql-client-ts\n[client-options]: https://docs.turso.tech/sdk/ts/reference#initializing\n\n## License\n\nThis project is licensed under the MIT license.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in `@libsql/kysely-libsql` by you, shall be licensed as MIT, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftursodatabase%2Fkysely-libsql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftursodatabase%2Fkysely-libsql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftursodatabase%2Fkysely-libsql/lists"}