Squiggle SQL Builder for Java Released


News: Squiggle SQL Builder for Java Released

  1. Squiggle SQL Builder for Java Released (9 messages)

    Joe Walnes has released Squiggle, a small Java library for dynamically building complicated SQL SELECT statements. Squiggle is open source code that has one missions only: It generates SELECT statements based on criteria you give it. It's sweet spot is for applications that need to build up complicated queries with criteria that changes at runtime.


    - Concise and intuitive API.
    - Simple code, so easy to customize.
    - No dependencies on classes outside of JDK1.2.
    - Small, lightweight, fast.
    - Generates clean SQL designed that is very human readable.
    - Supports joins and sub-selects.


    Visit the Squiggle tutorial to see how it all works.

    Squiggle Home Page

    Download Squiggle (zip, tgz)

    Threaded Messages (9)

  2. How does squiggle compare with the Query by Criteria feature of Hibernate?


  3. Is this DB aware and can represent convert(), TO_CHAR, sysdate, current, AVG, SUM, etc. for different database. Otherwise the entire idea doesn’t make sense, I guess.
  4. What about INSERT, UPDATE, DELETE ???[ Go to top ]

    Cool Tools.....

    What about INSERT, UPDATE, DELETE ???

    Any plan for it???
  5. Good work[ Go to top ]

    Seems neat. It shouldn't be too hard to support INSERT, DELETE and UPDATE as well with very little effort.

    What would be really useful are slightly out-of-the-way features like

    INSERT INTO <table>
    SELECT ...

    i.e., insert based on a selection rather than just a plain INSERT of values,


    UPDATE <table>
    SET <column> = <column> <operator> value
    WHERE ...

    i.e., update of existing values rather than new values.

  6. Yet another util libray[ Go to top ]

    Well, there is fate blog about this post :

    Probably most of TSS readers already have their preffered or their own SQL libraries.

  7. Actually....[ Go to top ]

    My post was not about this (I don't know why anyone would think that either!).

    This library is small and very focussed on its own core task. This is EXACTLY how all util libs should be. My rant is against generic dumping ground type util libraries where people just put in everything. The stuff that gets released doesn't address any particular problem particularly elegantly, it isn't focussed, you're just expected to take on some crap and use it 'generically' in some magical way.

    I wish util libs instead do what this one does, which is stick to one problem domain and address that as best as possible.
  8. Thanks Hani[ Go to top ]

    Thanks for clarifying this.
    I agree, but I have seen 10+ implementations of this idea. Basically what follows after is that people begin to add stuff, like all DB compatibility, inserts, updates, DB structure alteration, and so on, and the original idea become diluted. Not that these all ideas in ideal implementation would not be useful, they just becomes unnecessary when you reuse library in next project.
    Interface usability is dependant on project size. What is good for small things, is not good for big and vice versa.
    This library is for small things.

  9. just the select?[ Go to top ]

    I have the same idea with you by sql.
    I am so grant to see this tool.
    but,just the "select"?
    how about "update","delete"......?
  10. Most links are dead[ Go to top ]

    Most links in this article are dead, much as Squiggle itself is. I've recently (two years ago) checked back with the Squiggle "community" whether they are still alive and how they would compare themselves to jOOQ:


    Here's the answer of the author:

    Squiggle is a project I originally wrote a very long time ago. 1999! I 
    honestly can't remember the last time I even thought about it, until 
    now. So, no, I have no plans to continue working on it.

    So, compared to jOOQ, that's pretty dead :-)