valderman/selda
valderman/selda has 480 GitHub stars and 59 forks. Star changes are not measured yet. Last checked 2026-11-09 05:07 UTC. Last push 2026-05-21.
A type-safe, high-level SQL library for Haskell
What you can do
- Monadic interface.
- Portable: backends for SQLite and PostgreSQL.
- Generic: easy integration with your existing Haskell types.
- Creating, dropping and querying tables using type-safe database schemas.
측정된 스타 증가
- in 24h
- 기록 수집 중
- in 7 days
- 기록 수집 중
- in 15 days
- 기록 수집 중
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalSelda
What is Selda?
Selda is a Haskell library for interacting with SQL-based relational databases. It was inspired by LINQ and Opaleye.
Features
- Monadic interface.
- Portable: backends for SQLite and PostgreSQL.
- Generic: easy integration with your existing Haskell types.
- Creating, dropping and querying tables using type-safe database schemas.
- Typed query language with products, filtering, joins and aggregation.
- Inserting, updating and deleting rows from tables.
- Conditional insert/update.
- Transactions, uniqueness constraints and foreign keys.
- Type-safe, backend-specific functionality, such as JSON lookups.
- Seamless prepared statements.
- Lightweight and modular: few dependencies, and non-essential features are optional or split into add-on packages.
Getting started
Install the selda package from Hackage, as well as at least one of the
backends:
$ cabal update
$ cabal install selda selda-sqlite selda-postgresql
Then, read the tutorial. The API documentation will probably also come in handy.
Requirements
Selda requires GHC 8.0+, as well as SQLite 3.7.11+ or PostgreSQL 9.4+.
To build the SQLite backend, you need a C compiler installed.
To build the PostgreSQL backend, you need the libpq development libraries
installed (libpq-dev on Debian-based Linux distributions).
Hacking
Contributing
All forms of contributions are welcome!
If you have a bug to report, please try to include as much information as possible, preferably including:
- A brief description (one or two sentences) of the bug.
- The version of Selda+backend where the bug was found.
- A step-by-step guide to reproduce the bug.
- The expected result from following these steps.
- What actually happens when following the steps.
- Which component contains the bug (selda, selda-sqlite or selda-postgresql), if you're reasonably sure about where the bug is.
Bonus points for a small code example that illustrates the problem.
If you want to contribute code, please consult the following checklist before sending a pull request:
- Does the code build with a recent version of GHC?
- Do all the tests pass?
- Have you added any tests covering your code?
If you want to contribute code but don't really know where to begin, issues tagged good first issue are a good start.
Setting up the build environment
From the repository root:
- Install
libpq-devfrom your package manager. This is required to build the PostgreSQL backend. - Make sure you're running a cabal version that supports v2-style commands.
- Familiarise yourself with the various targets in the makefile. The dependencies between Selda, the backends and the tests are slightly complex, so straight-up cabal is too quirky for day to day hacking.
PostgreSQL backend testing with Docker
To test the PostgreSQL backend, use the provided pgtest-compose.yml docker-compose file:
sudo docker-compose -f pgtest-compose.yml up -d
make pgtest
sudo docker-compose -f pgtest-compose.yml down
TODOs
Features that would be nice to have but are not yet implemented.
- Monadic if/else
- Streaming
- MySQL/MariaDB backend
- MSSQL backend
관련 프로젝트 살펴보기
Asabeneh/30-Days-Of-Python
30 Days of Python 프로그래밍 챌린지는 Python 프로그래밍 언어를 30일 동안 배우기 위한 단계별 가이드입니다. 이 챌린지는 100일 이상 걸릴 수 있습니다. 자신의 속도에 맞춰 진행하세요. 다음 동영상도 도움이 될 수 있습니다: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw
78,423 스타grafana/grafana
개방적이고 조합 가능한 옵저버빌리티 및 데이터 시각화 플랫폼입니다. Prometheus, Loki, Elasticsearch, InfluxDB, Postgres 등 여러 소스의 메트릭, 로그, 트레이스를 시각화합니다.
77,763 스타redis/redis
실시간 데이터 기반 애플리케이션을 구축하는 개발자에게 Redis는 가장 선호되고, 가장 빠르며, 기능이 가장 풍부한 캐시, 데이터 구조 서버이자 문서 및 벡터 쿼리 엔진입니다.
77,309 스타apache/superset
Apache Superset는 데이터 시각화 및 데이터 탐색 플랫폼입니다.
75,453 스타