HIi, I have a main application and for other applications, I want to provide an sql connecion using an api. Like this, and other app we don't have to write directly sql request and don't have to manage connection. juste calling a method. But is complexe because we have a lot of parameters. I have an idea but I am note sur that is the best.
here is an example of the methode to make a select:
(Wheretype is an enum with all where type like "between", "like", "and" etc...)
the arraylist contain values in the where instruction. for example here the wheres_values contain age, 10 and 20
SELECT PLAYER
FROM T
WHERE age BETWEEN 10 AND 20;
selectQuerySql(ArrayList<String> selects, String from, WhereTypeEnum wheretype, ArrayList<Integer> where_values)```
is a good implmentation? thanks