Parrot – type-safe SQL in Gleam, supports SQlite, PostgreSQL and MySQL
9 hours ago
- #Gleam
- #database
- #sqlc
- Parrot is listed as a community project on the sqlc website.
- Supports SQLite, PostgreSQL, and MySQL databases.
- Features include multiple queries per file, database client agnostic, and utility wrappers for popular Gleam database libraries.
- Automatically pulls the database schema and downloads the sqlc binary.
- Named parameters infer names from SQL queries to avoid confusion and bugs.
- Generates type-safe access to SQL queries and compiles them into a single module.
- Includes example file structures and commands for running Parrot with different databases.
- Wrapper functions provided for lpil/pog and lpil/sqlight libraries.
- Integration tests available for PostgreSQL, MySQL, and SQLite.
- Known quirks include issues with complex data types and certain unsupported query annotations.
- Currently supports only Erlang Gleam applications, but generated code can run in JavaScript environments.
- Contributions and ideas are welcomed, with tasks organized on GitHub.