How do I get the number of parameter markers used in Criteria API?
I am using Criteria API to create SQL statement with IN
keyword that have many parameter markers.
CriteriaBuilder cb = ...
...
CriteriaBuilder.In<String> in = cb.in(...);
...
for (...) {
in.value(...);
}
I started getting SQLException
"Prepared or callable statement has more than 2000 parameter markers."
Is there a way to get the actual number of parameter markers used so far? I could count them by myself, but it is error prone.