Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Enhancement suggestion: Comments in SQL WHERE clauses

    Hi Isomorphic,

    we'll soon have a case where we have a lot of WHERE conditions generated by And, Or, InSet etc. criteria.
    While I can see that the generated SQL is in the order of insert into the Criteria objects, those conditions might still be hard to trace back to the java source.

    My suggestion is that you add a setComment(String comment) API to serverside and clientside criteria.
    Client side RPCManager should have a static setEnableCriteriaComments() API to transfer or not transfer these to the server.
    Server side server.properties should have a setting to print or not print all comments.
    If enabled serverside, the line-comments and afterwards line-breaks should be added to the generated SQL, making it multiline.
    This will look bad in the console output, but will help debugging SQL.

    I assume you'll rank this very low, and it is also not very important for me, but I wanted to leave the suggestion here anyways.

    Best regards
    Blama
Working...
X