# seancorfield/honeysql

Turn Clojure data structures into SQL

Repository: https://github.com/seancorfield/honeysql
Canonical: https://ross.abutalabs.com/products/honeysql
Homepage: https://cljdoc.org/d/com.github.seancorfield/honeysql/CURRENT
Language: Clojure
License: NOASSERTION
License Family: other
Last push: 2026-08-23T16:02:13+00:00

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 96, longevity 100
- inputs: {"age_days": 5164, "days_push": 10, "days_rel": 31, "gap_med": 28.5, "n_releases_24m": 19}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1918, forks 177 (observed 2026-08-28T04:05:53.985582+00:00)

## What it is
HoneySQL is a Clojure library that turns Clojure data structures into SQL statements, letting you build queries programmatically without string concatenation. It supports multiple SQL dialects (PostgreSQL, MySQL, XTDB, BigQuery, New Relic NRQL) and produces parameterized SQL strings suitable for use with JDBC wrappers like next.jdbc.

## Use cases
- build SQL queries from Clojure data structures
- generate parameterized SQL without string concatenation
- compose SQL queries dynamically at runtime
- generate dialect-specific SQL for PostgreSQL or MySQL
- build DDL statements like create-table and alter-table programmatically
- construct conditional WHERE clauses safely

## When to choose
- you write Clojure or ClojureScript and want SQL as composable data
- you need runtime query construction with safe parameterization
- you use next.jdbc or clojure.java.jdbc and want a query DSL
- you need multi-dialect SQL generation including vendor extensions

## When to avoid
- you need a tool that executes queries — HoneySQL only formats SQL, you need a JDBC wrapper separately
- you work outside the Clojure/JVM ecosystem
- you want a full ORM with entity mapping and migrations

## Facets
- artifact type: library
- maturity: active
- function: serialization, database, developer-tools
- domain: databases, developer-tools, backend
- platform: jvm, jvm-scripting, cross-platform
- tags: sql-query-builder, clojure, dsl, jdbc, clojurescript, sql-generation

## Member repositories
- seancorfield/honeysql (main) score 98

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:53.985582+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:10:07.554261+00:00, confidence not recorded.
  - readme: https://github.com/seancorfield/honeysql (fetched 2026-08-28T04:05:53.985582+00:00, sha 803d623019e8)
  - homepage: https://cljdoc.org/d/com.github.seancorfield/honeysql/CURRENT (fetched 2026-08-29T10:49:29.610153+00:00, sha 9ae41335737b)
  - site_page: https://cljdoc.org/d/com.github.seancorfield/honeysql/2.7.1437/doc/getting-started (fetched 2026-08-29T10:49:29.620167+00:00, sha df5adf804909)
  - site_page: https://cljdoc.org/d/com.github.seancorfield/honeysql/2.7.1437/doc/getting-started/general-reference (fetched 2026-08-29T10:49:29.622471+00:00, sha 79f5aa361c93)
  - site_page: https://cljdoc.org/d/com.github.seancorfield/honeysql/2.7.1437/doc/getting-started/sql-clause-reference (fetched 2026-08-29T10:49:29.624399+00:00, sha 2f5d4517edc0)
  - site_page: https://cljdoc.org/d/com.github.seancorfield/honeysql/2.7.1437/doc/getting-started/sql-operator-reference (fetched 2026-08-29T10:49:29.628064+00:00, sha aa00db6b266f)
  - site_page: https://cljdoc.org/d/com.github.seancorfield/honeysql/2.7.1437/doc/getting-started/sql-special-syntax- (fetched 2026-08-29T10:49:29.629984+00:00, sha 8e4c3d56fcbd)
  - site_page: https://cljdoc.org/d/com.github.seancorfield/honeysql/2.7.1437/doc/getting-started/postgresql-support (fetched 2026-08-29T10:49:29.632091+00:00, sha 119b2f801c9a)
  - site_page: https://cljdoc.org/d/com.github.seancorfield/honeysql/2.7.1437/doc/getting-started/xtdb-support (fetched 2026-08-29T10:49:29.634512+00:00, sha cb1a34cf52f7)
  - site_page: https://cljdoc.org/d/com.github.seancorfield/honeysql/2.7.1437/doc/getting-started/new-relic-nrql-support (fetched 2026-08-29T10:49:29.636391+00:00, sha 0a88cf2aaebb)
- Data as of 2026-08-30T08:39:29.467469+00:00.
