hasql-th
sql-parse
Our great sponsors
hasql-th | sql-parse | |
---|---|---|
4 | 1 | |
110 | 16 | |
- | - | |
5.2 | 6.7 | |
5 months ago | 20 days ago | |
Haskell | Rust | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
hasql-th
-
How to use PostgreSQL with Haskell: hasql
Hasql is an ecosystem of libraries. To keep it simple, let’s limit ourselves to core hasql, hasql-transaction, and hasql-th. We’re using hasql 1.6.3.2 published in 2023.
-
Parsing SQL
unexpected '&'
https://github.com/nikita-volkov/hasql-th#error-example-1
-
Open Source SQL Parsers
There is also a Haskell port of the original PostgreSQL parser, implemented using megaparsec, which makes it highly flexible and hackable: https://github.com/nikita-volkov/hasql-th#implementation
-
Haskell doesn't make sense without pure functions
I'd consider hasql-th a good example in what concerns databases. Otherwise, I just use aeson together with deriving-aeson and lens-aeson.
sql-parse
-
Parsing SQL
Parsing SQL can solve many problems, but before writing/choosing a parser you need to know what your goal is. For example, at work we wanted to have statically-typed SQL statements in Python/mypy to statically identify syntax errors, misspelled column names and bad type mixes. We came up with a home-grown SQL parser [1] and type checker [2] in Rust and a mypy plugin [3]. If someone knows of other solutions for obtaining SQL/mypy integration I'd love to know about it, since parsing SQL is not exactly supposed to be our field of work.
[1] https://github.com/antialize/sql-parse/blob/7869595aa92aed0b...
What are some alternatives?
Neks - A dead simple networked key/value store
js-miniquery - SQL Where like filter expression for sequelize
tokyocabinet-haskell - This repository will get archived soon. Please visit https://git.singpolyma.net/tokyocabinet-haskell
go-mysql-server - A MySQL-compatible relational database with a storage agnostic query engine. Implemented in pure Go.
hasql - The fastest PostgreSQL libpq-based driver for Haskell
sql-type
wai-middleware-cache-redis - Redis backend for wai-middleware-cache
zetasql - ZetaSQL - Analyzer Framework for SQL
ampersand - Build database applications faster than anyone else, and keep your data pollution free as a bonus.
hasql-notifications - Use PostgreSQL LISTEN/NOTIFY with your Hasql Types
hasql-transaction - A composable abstraction over retriable transactions for Hasql
hasql-cursor-query - A declarative abstraction over PostgreSQL Cursor