{"id":13617105,"url":"https://github.com/valderman/selda","last_synced_at":"2025-05-15T19:06:33.178Z","repository":{"id":19691768,"uuid":"87664695","full_name":"valderman/selda","owner":"valderman","description":"A type-safe, high-level SQL library for Haskell","archived":false,"fork":false,"pushed_at":"2024-06-05T05:42:28.000Z","size":1093,"stargazers_count":478,"open_issues_count":49,"forks_count":57,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-05-09T11:19:00.675Z","etag":null,"topics":["dsl","haskell-library","postgresql","sql","sqlite"],"latest_commit_sha":null,"homepage":"https://selda.link","language":"Haskell","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/valderman.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.hs","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":"2017-04-08T21:15:10.000Z","updated_at":"2025-02-25T22:46:48.000Z","dependencies_parsed_at":"2023-02-19T02:30:47.156Z","dependency_job_id":"6328c98d-464a-475c-b4df-0e99a02d5583","html_url":"https://github.com/valderman/selda","commit_stats":{"total_commits":665,"total_committers":29,"mean_commits":22.93103448275862,"dds":0.1037593984962406,"last_synced_commit":"ab9619db13b93867d1a244441bb4de03d3e1dadb"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valderman%2Fselda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valderman%2Fselda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valderman%2Fselda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valderman%2Fselda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valderman","download_url":"https://codeload.github.com/valderman/selda/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254404357,"owners_count":22065641,"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":["dsl","haskell-library","postgresql","sql","sqlite"],"created_at":"2024-08-01T20:01:37.012Z","updated_at":"2025-05-15T19:06:33.157Z","avatar_url":"https://github.com/valderman.png","language":"Haskell","readme":"Selda\n=====\n\n[![Join the chat at https://gitter.im/selda-hs/Lobby](https://badges.gitter.im/selda-hs/Lobby.svg)](https://gitter.im/selda-hs/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![Hackage](https://img.shields.io/hackage/v/selda.svg?style=flat)](http://hackage.haskell.org/package/selda)\n[![IRC channel](https://img.shields.io/badge/IRC-%23selda-1e72ff.svg?style=flat)](https://www.irccloud.com/invite?channel=%23selda\u0026amp;hostname=irc.freenode.net\u0026amp;port=6697\u0026amp;ssl=1)\n![MIT License](http://img.shields.io/badge/license-MIT-brightgreen.svg)\n![Haskell CI](https://github.com/valderman/selda/workflows/Haskell%20CI/badge.svg)\n[![Hackage Dependencies](https://img.shields.io/hackage-deps/v/selda.svg)](https://packdeps.haskellers.com/feed?needle=selda)\n\n\nWhat is Selda?\n==============\n[Selda](https://selda.link) is a Haskell library for interacting with SQL-based relational databases.\nIt was inspired by [LINQ](https://en.wikipedia.org/wiki/Language_Integrated_Query) and\n[Opaleye](http://hackage.haskell.org/package/opaleye).\n\n\nFeatures\n========\n\n* Monadic interface.\n* Portable: backends for SQLite and PostgreSQL.\n* Generic: easy integration with your existing Haskell types.\n* Creating, dropping and querying tables using type-safe database schemas.\n* Typed query language with products, filtering, joins and aggregation.\n* Inserting, updating and deleting rows from tables.\n* Conditional insert/update.\n* Transactions, uniqueness constraints and foreign keys.\n* Type-safe, backend-specific functionality, such as JSON lookups.\n* Seamless prepared statements.\n* Lightweight and modular: few dependencies, and non-essential features are\n  optional or split into add-on packages.\n\n\nGetting started\n===============\n\nInstall the `selda` package from Hackage, as well as at least one of the\nbackends:\n\n    $ cabal update\n    $ cabal install selda selda-sqlite selda-postgresql\n\nThen, read [the tutorial](https://selda.link/tutorial).\nThe [API documentation](http://hackage.haskell.org/package/selda) will probably\nalso come in handy.\n\n\nRequirements\n============\n\nSelda requires GHC 8.0+, as well as SQLite 3.7.11+ or PostgreSQL 9.4+.\nTo build the SQLite backend, you need a C compiler installed.\nTo build the PostgreSQL backend, you need the `libpq` development libraries\ninstalled (`libpq-dev` on Debian-based Linux distributions).\n\nHacking\n=======\n\nContributing\n------------\n\nAll forms of contributions are welcome!\n\nIf you have a bug to report, please try to include as much information as\npossible, preferably including:\n\n* A brief description (one or two sentences) of the bug.\n* The version of Selda+backend where the bug was found.\n* A step-by-step guide to reproduce the bug.\n* The *expected* result from following these steps.\n* What *actually* happens when following the steps.\n* Which component contains the bug (selda, selda-sqlite or selda-postgresql),\n  if you're reasonably sure about where the bug is.\n\nBonus points for a small code example that illustrates the problem.\n\nIf you want to contribute code, please consult the following checklist before\nsending a pull request:\n\n* Does the code build with a recent version of GHC?\n* Do all the tests pass?\n* Have you added any tests covering your code?\n\nIf you want to contribute code but don't really know where to begin,\nissues tagged [good first issue](https://github.com/valderman/selda/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) are a good start.\n\n\nSetting up the build environment\n--------------------------------\n\nFrom the repository root:\n\n* Install `libpq-dev` from your package manager.\n    This is required to build the PostgreSQL backend.\n* Make sure you're running a cabal version that supports v2-style commands.\n* Familiarise yourself with the various targets in the makefile.\n    The dependencies between Selda, the backends and the tests are slightly\n    complex, so straight-up cabal is too quirky for day to day hacking.\n\n\nPostgreSQL backend testing with Docker\n--------------------------------------\n\nTo test the PostgreSQL backend, use the provided `pgtest-compose.yml` docker-compose file:\n```\nsudo docker-compose -f pgtest-compose.yml up -d\nmake pgtest\nsudo docker-compose -f pgtest-compose.yml down\n```\n\n\nTODOs\n-----\n\nFeatures that would be nice to have but are not yet implemented.\n\n* Monadic if/else\n* Streaming\n* MySQL/MariaDB backend\n* MSSQL backend\n","funding_links":[],"categories":["Haskell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalderman%2Fselda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalderman%2Fselda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalderman%2Fselda/lists"}