Reputation: 28611
Are there Java classes for manipulating SQL statements?
For example, break this statement
SELECT col1, col2 FROM table WHERE a = 1 AND b = 2 ORDER BY 1;
into some kind of map.
['select' => {'col1', 'col2'}, 'from' => {'table'}, 'where' => ..]
Then, you would be able to say add to the where clause or add tables to select from. Is this possible?
Upvotes: 0
Views: 117
Reputation: 33092
You could use squiggle-sql. It's API is object oriented but you could map it.
Upvotes: 1