Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parse SQL to sql builder

Is there easy way to convert SQL string like:

SELECT u.name, u.role 
FROM users 
WHERE user_id = ?

to any of SQL builders like JOOQ, QueryDsl just to get ability to modify query — add joins, additional "where" clauses, LIMIT-OFFSET?

like image 879
zhogov Avatar asked Mar 15 '23 20:03

zhogov


1 Answers

Another option, I've used JSQLParser in the past for a project like this. It wasn't very difficult to use.

like image 125
kervin Avatar answered Mar 27 '23 12:03

kervin