{"id":29979665,"url":"https://github.com/jerbaroo/database-generic","last_synced_at":"2025-08-04T13:33:25.633Z","repository":{"id":280477254,"uuid":"906673422","full_name":"jerbaroo/database-generic","owner":"jerbaroo","description":"Database agnostic typeclass to access generically persisted data.","archived":false,"fork":false,"pushed_at":"2025-06-14T19:57:30.000Z","size":192,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-14T20:03:31.799Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jerbaroo.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null}},"created_at":"2024-12-21T15:16:10.000Z","updated_at":"2025-06-10T19:37:50.000Z","dependencies_parsed_at":"2025-06-14T19:54:07.385Z","dependency_job_id":"e32666eb-9358-430a-8c25-f6419cf69f21","html_url":"https://github.com/jerbaroo/database-generic","commit_stats":null,"previous_names":["jerbaroo/database-generic"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jerbaroo/database-generic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerbaroo%2Fdatabase-generic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerbaroo%2Fdatabase-generic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerbaroo%2Fdatabase-generic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerbaroo%2Fdatabase-generic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jerbaroo","download_url":"https://codeload.github.com/jerbaroo/database-generic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerbaroo%2Fdatabase-generic/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268701779,"owners_count":24292996,"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","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-08-04T13:32:54.582Z","updated_at":"2025-08-04T13:33:25.621Z","avatar_url":"https://github.com/jerbaroo.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# database-generic\n\nDatabase-agnostic interface to generically persisted data.\n\n## Introduction\n\nExplanation of the above:\n- Database-agnostic: the typeclass is called `MonadDb`, and you must specify how\n  an instance can communicate with your database. We provide an example for\n  connecting to Postgres in the [runnable tutorial](tutorial/tutorial/Main.hs).\n- Generically persisted data: you can derive the necessary instances in one line\n  via `Generics`, to enable `MonadDb` to read/write instances of your data types\n  to/from your database.\n\nA key intended feature of this library is that the typeclass `MonadDb` can be\nused either server-side or client-side. Allowing your client application (e.g.\nweb app) to use the same functions to access your data as your server-side does.\n\nAnother important intended feature is an optional `servant` server. Merely\nprovide an instance of `MonadDb` so the server knows how to communicate with\nyour database, then the server can act as a proxy to allow clients to read/write\nto your database without having to write the usual server boilerplate.\n\n## Quick Start\n\nThe [runnable tutorial](tutorial/tutorial/Main.hs) is the recommended way of\nbecoming familiar with `database-generic`.\n\nTo run the tutorial on your machine:\n1. Clone this repo.\n2. Start a PostgreSQL instance with username and password `demo`, e.g.:\n  `docker run -it --rm --env POSTGRES_PASSWORD=demo --env POSTGRES_USER=demo --publish 5432:5432 postgres`\n3. Then `cabal run tutorial` via provided `nix-shell`.\n\n## Features\n\nExamples of the following features can be found in [the\ntutorial](tutorial/tutorial/Main.hs).\n\n| Feature                                  | In Tutorial | Tested |\n|------------------------------------------|-------------|--------|\n| Create table                             | ✅          | ✅     |\n| Insert one                               | ✅          |        |\n| Insert many                              | ✅          |        |\n| Insert returning                         | ✅          |        |\n| Insert returning fields                  | ✅          | ✅     |\n| Select by PK                             | ✅          | ✅     |\n| Select all                               | ✅          | ✅     |\n| Select returning fields                  | ✅          | ✅     |\n| Where column equals                      |             |        |\n| Where column is null                     |             |        |\n| Where column is not null                 |             |        |\n| Limit clause                             | ✅          | ✅     |\n| Offset clause                            | ✅          | ✅     |\n| Order by clause                          | ✅          | ✅     |\n| Delete by PK                             | ✅          | ✅     |\n| Delete all                               | ✅          | ✅     |\n| Delete returning                         | ✅          | ✅     |\n| Server: endpoint to execute statement    | ✅          |        |\n| Joins                                    |             |        |\n| Stream statements over Conduit           |             |        |\n| Stream updates over Conduit              |             |        |\n| Server: stream statements over WebSocket |             |        |\n| Server: stream updates over WebSocket    |             |        |\n| Server: permission checks                |             |        |\n| Reflex (client-side) MonadDb instance    |             |        |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjerbaroo%2Fdatabase-generic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjerbaroo%2Fdatabase-generic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjerbaroo%2Fdatabase-generic/lists"}