Thank you for your answer
To answer your questions:
- Named params can be very useful when the query contains a large number of parameters that repeats itself, therefore they avoid the error in the number or order of '?'.
- Example :
A) select
t.code, b.blibli from tata t, b blabla
Where t.identifiant = b.tata
and t.titi =?
and b.
blibli like?
==>
B) select t.code, b.blibli from tata t, b blabla
Where t.identifiant = b.tata
and t.titi =?
and b.blibli like :name
- I propose to keep the same call Db.fetch (Class, SqlId, Object ...). To Add two transformations in the constructor of the class SQLStatement:
- Recreate the Object... aSqlParams. To support duplication of named parameters.
- Change the parameter to replace sqltext ( :name, for example) by '?'.
and so return syntax A from B.
Regards,