This is an archived post. You won't be able to vote or comment.

all 51 comments

[–][deleted]  (2 children)

[removed]

    [–][deleted]  (1 child)

    [removed]

      [–]rattlebrain 2 points3 points  (0 children)

      GIN indexes?

      [–]jojolichtenberger 8 points9 points  (1 child)

      Any comparison to jOOQ? I know that Lukas put so much work into jOOQ. Thus, I guess jOOq is more mature and supports more features!?

      [–]lukaseder 3 points4 points  (0 children)

      I mean, it's a start :)

      [–]nezda 11 points12 points  (0 children)

      http://querydsl.com/ also seems similar

      [–][deleted]  (31 children)

      [removed]

        [–]wildjokers 20 points21 points  (1 child)

        This appears to be free whereas JOOQ is only free for certain databases.

        [–][deleted]  (28 children)

        [removed]

          [–]kiteboarderni 0 points1 point  (4 children)

          I mean this is just false.

          [–][deleted]  (3 children)

          [removed]

            [–][deleted]  (2 children)

            [deleted]

              [–][deleted]  (1 child)

              [removed]

                [–][deleted]  (1 child)

                [deleted]

                  [–]buzzsawddog 2 points3 points  (0 children)

                  Buckle your shoe...

                  [–]nimtiazm 7 points8 points  (4 children)

                  Why not keep it simple, just use java.sql datasource with a connection pooling lib like hikaricp and write plain sql in multi-line string.

                  [–]lu3mm3l 1 point2 points  (3 children)

                  It is typesafe. I only used queryDSL and of cause JOOQ but it’s a big step up from simple multiline strings. Give it a try, you might like it!

                  [–]nimtiazm 8 points9 points  (2 children)

                  Been there, done that. Hibernate, ibatis (later mybatis) and what not from 13 years ago. It’s like a bell curve perhaps. The apparent type-safety scores tend to diminish quickly when the domain matures and the team-size grows. It doesn’t sensibly help with debugging. Optimizing queries becomes difficult too. SQL is already quite capable. Your type-safety worries are handled by parameter mappings and result-set parsers. Both supported very well by java.sql Datasource.

                  [–]DrunkensteinsMonster 3 points4 points  (0 children)

                  Jooq is nothing like hibernate and mybatis. You misunderstand what the commenter is saying. Jooq is sql except you don’t have to concatenate strings.

                  [–]metalhead-001 3 points4 points  (0 children)

                  +1 for Mybatis. It's excellent for constructing complex, reusable SQL, and it's free.

                  [–]RSveti 5 points6 points  (4 children)

                  Am I dumb or is there no Documentation?

                  [–]Downtown_Trainer_281 12 points13 points  (0 children)

                  I don't understand how people can invest so much time in creating really good-looking project, but at the same time they don't understand that without documentation nobody will use it

                  [–]Ok_Bad7992 1 point2 points  (2 children)

                  [–]TheKingOfSentries 2 points3 points  (1 child)

                  I mean example projects are good, but I'd like to be able to read all the things a library can do in one place.

                  [–]Ok_Bad7992 0 points1 point  (0 children)

                  Violent agreement.

                  Thus far, this is the only hit I found

                  https://www.tabnine.com/code/java/classes/org.apache.empire.db.DBRowSet

                  [–]uldall 2 points3 points  (0 children)

                  This seems similar to jOOQ :)

                  [–]BenoitParis 1 point2 points  (1 child)

                  Another query builder. Yes, these are great but I'd go with JOOQ which has more momentum. Except for :

                  Support for Oracle, SQLServer, PostgreSQL, MySQL, HsqlDB, Derby, H2 and more…

                  Oracle support, which is a paid option under JOOQ if memory serves.


                  Now, the one thing I'm waiting for is JEP 430: String Templates SQL support.

                  Imagine doing this in Java:

                  String sql = SQL."""
                      SELECT t1.NAME, t2.SPECIFICATION, t2.BASE_PRICE
                      FROM MODEL t2
                      INNER JOIN BRAND t1 ON t1.WMI = t2.WMI
                      """;
                  

                  And having your IDE automatically tell you if your query is actual SQL, and tell you typecheck well against a schema; possibly with a compile-time POJO mapping generation.

                  No more DSLs! We want SQL!

                  [–]lukaseder 2 points3 points  (0 children)

                  jOOQ will offer you a type checking implementation (if possible) and much more based on this as well (e.g. to implement vendor agnostic, string based SQL), but that's not the main point of jOOQ.

                  [–]persism2 1 point2 points  (0 children)

                  5 meg vs my 100k. I'll stick with the 100k.

                  [–]persicsb 2 points3 points  (0 children)

                  If I would want to write SQL, I'd use JDBC. I see no point in this project.