Liking cljdoc? Tell your friends :D

Bisql

Clojars Project Docs Ask DeepWiki

Bisql bicycle logo

Bisql (pronounced báisikl 🚲) is a SQL-first, SQL-only, SQL-obsessed data access toolkit for Clojure.

Write real SQL. Keep it executable. Generate the boring parts.

  • Query templates remain valid, executable SQL.
  • Typical index-friendly queries are generated automatically, as comprehensively as possible.

No query builder
No data mapper
No hidden SQL
No boilerplate SQL

note

This project is still early and the API may change. Support for databases beyond PostgreSQL and Malli integration are both planned.

Installation

The full Installation guide lives here:

Getting Started

The full Getting Started guide lives here:

Quick Example

See the end-to-end sample project here:

It shows a practical flow:

  • generate CRUD SQL from a PostgreSQL schema
  • generate matching function namespace files
  • execute one generated query
  • copy one generated query into a hand-written SQL template
  • execute the customized query

Development

For local setup, tasks, and dev workflow, see:

Roadmap

  • Support a very small expression language to improve expressiveness in if conditions.
  • Add Malli integration.
  • Support databases beyond PostgreSQL.
  • Compile analyzed SQL templates into reusable renderer functions for lower runtime overhead.
    • Simplify emitted renderer forms further, especially around branch and loop body handling.
    • Reduce helper calls in emitted code where fragment normalization is still delegated.
    • Restrict bisql/DEFAULT to valid SQL value contexts if context-aware rendering becomes necessary.
    • Detect dangerous nil comparisons consistently in WHERE / HAVING clauses instead of letting expressions such as = NULL, LIKE NULL, or IN (NULL) silently behave unexpectedly. This likely needs stricter SQL context parsing, because = NULL is dangerous in WHERE / HAVING but can still be valid assignment syntax in SET.

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close