-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify specification around type conversion via Column.get(int, Class) #210
Comments
I'd like to double down on this lack of specification clarity here. We only have a few drivers yet, and already I don't know if I should use create table t (b blob);
insert into t values (null); And then: Class<?> klass = ...?
System.out.println(
Flux.from(cf.create())
.flatMap(c -> c.createStatement("select b from t").execute())
.flatMap(it -> it.map((r, m) -> Optional.ofNullable(r.get(0, klass))))
.collectList()
.block()
); What do I put for |
For real blobs, that can contain a significant amount of data (an amount that doesn't easily fit into your heap size), please use |
I don't remember having used those Oracle BLOB features, ever. When I stored images or PDFs in BLOBs, Anyway. Thanks for the clarification on this part. |
Fully agree. According to their database, a |
I've raised the question in this discussion: oracle/oracle-r2dbc#17 (comment). Curious about the findings here. |
I'd really like for Oracle R2DBC to support the ByteBuffer mapping of BLOB, but so far I've been unable to identify a good way to do it. I posted my thoughts about this here: Maybe someone can think of a better solution? If so, then please post on the issue I've linked to above. Any discussion is welcome! |
Going back to the original topic, Section 14 of the R2DBC Specification provides a "guideline" of SQL to Java type mappings. If we can expect all R2DBC drivers to support these mappings, does this offer enough clarify an R2DBC consumer? |
Feature Request
See also discussion here:
https://groups.google.com/g/r2dbc/c/0fpr5DY3big
Is your feature request related to a problem? Please describe
In https://r2dbc.io/spec/0.9.0.M1/spec/html/#rows, the specification claims that
This specification is a bit vague and allows for both assumptions:
Describe the solution you'd like
I'm assuming that some "reasonable" conversions can be safely expected to work on all drivers, but this is currently not the case, see e.g.:
I'd like the specification to be more specific, not having an opinion in which direction it should go, but as a client implementation, I would like to have certainty that certain conversions are can safely be expected to work now, and in the future.
The text was updated successfully, but these errors were encountered: