Hi Everyone,
Okay, the discussion about CMB/JDO/JDBC aside, lets assume that for reasons I won't go into, JDBC has won the day.
I want to build up a query for a JDBC statement in various parts of a system and then extract the string query for execution. I really dislike modifying a string with concatenations and believe there should be a support class which supports building an SQL query objectively.
Some sample operations may be:
void SQLQuery.addConstraint(Constraint c)
void SQLQuery.addJoin(Table t, Constraint c)
void SQLQuery.addJoin(Table t, JoinTable t2, JoinField f)
This way, a query could be passed between various parts of the system, where it could then be interrogated and augmented in a standard way. Finally, when it was time to execute the JDBC query, the following method could be used:
boolean SQLQuery.parseSyntax()
String SQLQuery.getQuery()
I have seen one product called JStorm which tries to emulate this functionality but I am looking for a more full featured suite.
Regards,
David Levy
-
Non GUI JDBC SQL Query Builder Class (2 messages)
- Posted by: david levy
- Posted on: September 21 2003 21:27 EDT
Threaded Messages (2)
- Non GUI JDBC SQL Query Builder Class by Leonard Gurevich on September 22 2003 14:02 EDT
- Thanks by david levy on September 22 2003 20:53 EDT
-
Non GUI JDBC SQL Query Builder Class[ Go to top ]
- Posted by: Leonard Gurevich
- Posted on: September 22 2003 14:02 EDT
- in response to david levy
-
Thanks[ Go to top ]
- Posted by: david levy
- Posted on: September 22 2003 20:53 EDT
- in response to Leonard Gurevich
Thanks for that, exactly what I'm after.