java.sql2 usage examples
Lukas Eder
lukas.eder at gmail.com
Wed Oct 4 08:45:59 UTC 2017
Hello,
We've been in touch briefly on Twitter after Bruno Borges has announced the
current status quo of your work on the java.sql2 package / module:
https://twitter.com/brunoborges/status/915302682939711488
I'm very happy to see that this is being worked on, and specifically, that
it will be integrated with the new JDK 9 Flow API.
I'm intrigued by the suggested API design which models everything as an
Operation. However, from the API itself, it is not trivial to deduce how it
should be used. Specifically, the <S, T> types in OperationGroup<S, T> do
not seem to be clear to me. When obtaining such an OperationGroup<S, T>
reference through Connection.operationGroup(), the API user is completely
free to bind any type to the type variables, which seems surprising, given
that the types are erased and the implementation cannot guess what the
caller's intentions were. Do you have some examples about how to use this,
e.g.:
- A typical example for calling OperationGroup.rowOperation()
- What the idea behind the various initialValue(Supplier<T>) methods is
- An example of how to use DynamicMultiOperation<T>. I'm assuming this is
for calling procedures that produce a mixture of row counts / result sets /
exceptions as is done sometimes in MySQL / SQL Server
I have more questions about some details, which I'll ask in separate emails
Thanks,
Lukas (from the jOOQ team)
More information about the jdbc-spec-discuss
mailing list