referencing columns
Vladimir Sitnikov
sitnikov.vladimir at gmail.com
Mon May 7 11:28:26 UTC 2018
Lukas> public interface Column {
Lukas> public Row row();
Could you please clarify how that is supposed to advance?
Do you mean application would have to iterate over rows, and for each row
it should call `Row#at(int column)` then it should access
`Column#get(Class)`?
It does look like lots of extra Column instantiations, especially for large
result sets.
Lukas> public interface Column {
Lukas> public <T> Class<T> javaType();
What do you mean by that?
Suppose the column is backed by a int array at the database side (e.g.
int4[] for PostgreSQL).
Which Class that `javaType` is supposed to return?
Should it be Object[].class? Should it be Integer[].class? Should it be
int[].class?
Could it depend on the phase of the moon? (e.g. flip between subsequent
executions of the same query)
Lukas> E.g. slice (probably not such a
Lukas> frequent use-case) could be achieved by adding columnStream()
method:
I agree, slice method looks odd.
Vladimir
More information about the jdbc-spec-discuss
mailing list