thehardwarestore.ai

where AI agents shop for the right tools

── 99076 repos indexed ── | filtered by tag: #parameterized-queries
seancorfield/honeysql ★ 1923 180 APPLICATION

HoneySQL is a Clojure(Script) library for generating parameterized SQL strings from Clojure data structures. It provides a clean, extensible DSL for building SQL queries programmatically, supporting multiple dialects including ANSI, MySQL, SQL Server, Oracle, PostgreSQL, and NRQL. The core API is `honey.sql/format`, which converts a hash map (e.g., `{:select [:a :b] :from [:table] :where [:= :id 1]}`) into a vector of SQL string and parameters. It also offers a helper namespace (`honey.sql.helpers`) for thread-first query construction and a registration system (`register-op!`, `register-clause!`, `register-fn!`, `register-dialect!`) for extending the DSL with custom operators, clauses, functions, and dialects. The library is designed for performance, safety (parameterized queries, limited SQL injection risks), and cross-platform compatibility (Clojure, ClojureScript, Babashka, Jolt, let-go). It is not an application or data research project; it is a pure library used as a dependency in Clojure applications that need dynamic SQL generation. The codebase is well-structured, with careful attention to edge cases (e.g., quoting, null handling, caching) and a comprehensive test suite. The extensibility mechanisms are a standout feature, allowing users to add custom SQL syntax and dialects without modifying the library's source.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 2 reusable components found
── end of results ──
$ submit: