A Clojure library that introspects PostgreSQL databases at compile time to generate clojure.spec definitions and automate CRUD queries.
Specql is a Clojure library that automates PostgreSQL CRUD queries by introspecting database schemas at compile time. It generates clojure.spec definitions for tables and columns, enabling type-safe queries with minimal boilerplate. The library simplifies common database operations while integrating seamlessly with Clojure's spec system for data validation.
Clojure developers building applications with PostgreSQL who want type-safe database interactions and reduced query boilerplate. It's particularly useful for teams leveraging clojure.spec for data validation and seeking compile-time database schema integration.
Developers choose Specql for its automatic spec generation and type-safe querying, which eliminates manual schema definition and reduces runtime errors. Its focus on common CRUD operations while deferring complex queries to SQL provides a pragmatic balance between automation and flexibility.
Automatic PostgreSQL CRUD queries
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Introspects PostgreSQL schemas at compile time to create clojure.spec definitions for tables and columns, eliminating manual boilerplate as shown in the usage example.
Uses namespaced keywords for columns, ensuring query correctness and leveraging Clojure's spec system for validation, reducing runtime errors.
Unpacks PostgreSQL user-defined types and arrays into nested Clojure maps, handling complex data structures seamlessly, as highlighted in the key features.
Works with database views and materialized views just like tables, allowing complex queries to be abstracted and used via specql, as mentioned in the philosophy section.
Limited to PostgreSQL databases with no support for other SQL systems, reducing flexibility for multi-database projects.
Requires a live database connection at compile time for introspection, which can complicate build processes and CI/CD pipelines, though caching is available.
Marked as 'work in progress' with frequent alpha releases and breaking changes in the version history, indicating potential instability for production use.