{"id":20240909,"url":"https://github.com/aquapi/sql-light","last_synced_at":"2025-03-03T15:14:56.142Z","repository":{"id":219844361,"uuid":"749869387","full_name":"aquapi/sql-light","owner":"aquapi","description":"SQLite query builder for ya smol project","archived":false,"fork":false,"pushed_at":"2024-01-31T07:11:54.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-14T01:34:07.557Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/aquapi.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":"2024-01-29T15:03:44.000Z","updated_at":"2024-02-08T05:52:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"6d017cc6-c33b-425f-b178-32a843b1441f","html_url":"https://github.com/aquapi/sql-light","commit_stats":null,"previous_names":["aquapi/sql-light"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquapi%2Fsql-light","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquapi%2Fsql-light/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquapi%2Fsql-light/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquapi%2Fsql-light/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aquapi","download_url":"https://codeload.github.com/aquapi/sql-light/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241686832,"owners_count":20003112,"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":[],"created_at":"2024-11-14T08:50:29.994Z","updated_at":"2025-03-03T15:14:56.110Z","avatar_url":"https://github.com/aquapi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `sql-light`\nA simple SQLite query builder.\n\nExample using Bun SQLite:\n```ts\nimport sql from 'sql-light';\nimport db from './my-db.db' with { type: 'sqlite' };\n\n// Create user table\nconst userTable = sql.table({\n    name: 'Users',\n    schema: {\n        name: 'text not null',\n        pass: 'text not null'\n    },\n    // Type hint here\n    primaryKeys: ['name']\n});\n\n// Run create table statement\ndb.run(userTable.init);\n\n// Create a query\nconst selectUser = sql.query(`select ${userTable.col.pass} from ${userTable} where ${userTable.$name} = $name`);\n\n// Feed to Bun query initializer\nconst query = db.query\u003c{ pass: string }, typeof selectUser.infer\u003e(selectUser);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faquapi%2Fsql-light","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faquapi%2Fsql-light","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faquapi%2Fsql-light/lists"}