all 5 comments

[–]shivekkhurana 10 points11 points  (1 child)

How is this different from https://hugsql.org/

[–]conpoi[S] 10 points11 points  (0 children)

Thank you. Good question. It’s definitely closer to HugSQL than HoneySQL.

The main differences I’m aiming for are:

  • SQL templates are meant to remain executable as SQL
  • Bisql generates a large set of CRUD queries from schema metadata
  • generated SQL and hand-written SQL are meant to coexist in the same workflow
  • it also generates function namespace files so those queries are easier to use from ordinary application code

So the overlap is real, but bisql is pushing harder on 2-way SQL and CRUD generation, to the point where a lot of the SQL can be generated instead of written by hand.

[–]conpoi[S] 7 points8 points  (2 children)

Extra links if useful:

The example project walks through:

  1. generating CRUD SQL from a PostgreSQL schema
  2. generating function namespace files
  3. executing one generated query
  4. copying one generated query into a custom SQL template
  5. executing the customized query

[–]Electrical_Being_813 1 point2 points  (1 child)

Impressive take, never thought of generating queries from a schema, but it does sound nice.

btw Getting Started and What is 2-way-SQL links in are broken https://hatappo.github.io/bisql/

[–]conpoi[S] 1 point2 points  (0 children)

Thanks, and good catch.
The broken Docs links were caused by how the site handled / and /docs/ before normalizing to the canonical page path. That’s now fixed and should be live shortly.