fluent SQL

Languages and libraries

sql query builder library

SHOW HN2013

35points
28comments
#702of 1,739 in 2013
Top 41%of 2013 by points

How HN took it

DebatedReal support and real criticism

5 positive, 4 neutral or asking, 1 mixed, 5 critical, out of 15 comments about the project. Thread score -0.08.

Idea: 2 for, 4 againstDesign: 3 for, 0 againstExecution: 0 for, 1 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Clean, slick DSL-style API that resembles SQL

    From 3 comments
    • This is opinion only, so please don't take this as me being negative: I really like the idea, but there's one thing which need to happen for this to be upstream. Most decent…
      zeroDivisible on HN
    • Looks cool. I love DSL style API for chaining calls. Make it so simple.
      ww520 on HN
    • Very slick. My only suggestion is to allow a bit more terseness by adding static versions of all the calls that can happen at the beginning of the Query. The static versions…
      cpfohl on HN

Objections

  • Embedding SQL in Java is less readable than plain SQL

    From 2 comments
    • I don't like this. I'm strongly of the opinion that SQL is a beautiful language, able to express in terse yet readable statements operations which would take many pages of Java…
      steve_barham on HN
    • Looks cool, but personally I'd rather just use regular SQL.
      icedchai on HN
  • Existing jOOQ library already does this more fully

    From 2 comments
    • This looks very similar to jOOQ in my first impression. http://www.jooq.org/ I wonder if the author was aware of the existence of jOOQ?
      jhh on HN
    • Nice, but anyone needing something like this should probably consider looking at jooq.
      mimog on HN

Requests

  • Static factory methods for starting queries, e.g. Query.SELECT_ALL()

    From 2 comments
    • Very slick. My only suggestion is to allow a bit more terseness by adding static versions of all the calls that can happen at the beginning of the Query. The static versions…
      cpfohl on HN
    • That helps, specifically with static imports, e.g. import static com.example.Query.*;
      lukaseder on HN

Questions

  • How is table and column name checking done statically when names are strings?

    From 1 comment
    • Do you have an example of this static analysis of table/column names? From what I see in your documentation, these things are string-based...? How can they be statically analysed?
      lukaseder on HN

Alternatives named

  • jOOQ

    From 2 comments
    • This looks very similar to jOOQ in my first impression. http://www.jooq.org/ I wonder if the author was aware of the existence of jOOQ?
      jhh on HN
    • I think jOOQ is a little more heavyweight. It introspects your database and builds a Java class structure that reflects the schema. More typesafe, certainly, but more of a…
      jkrasnay on HN
  • Squiggle SQL

    From 1 comment
    • Hmm looks a bit like Squiggle SQL, http://code.google.com/p/squiggle-sql/ but less
      time4tea on HN
  • sqlbuilder (jkrasnay)

    From 1 comment
    • Looks cool! I wrote a similar library that's been working out well in my projects: https://github.com/jkrasnay/sqlbuilder
      jkrasnay on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/5956867)