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
feat: adds getValue to ResultSet #1073
Changes from 10 commits
a38c291
88e8f35
6a5680c
7c2e990
06d2e9c
3a76dc0
49f3d83
02a027e
285b048
bab743f
cab531b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,6 +132,16 @@ public interface StructReader { | |
/** Returns the value of a non-{@code NULL} column with type {@link Type#date()}. */ | ||
Date getDate(String columnName); | ||
|
||
/** Returns the value of a non-{@code NULL} column as a {@link Value}. */ | ||
default Value getValue(int columnIndex) { | ||
throw new UnsupportedOperationException("method should be overwritten"); | ||
} | ||
|
||
/** Returns the value of a non-{@code NULL} column as a {@link Value}. */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: This should be updated to indicate that this method can be called for columns that contain a null value, and what the behavior is when the value is null. |
||
default Value getValue(String columnName) { | ||
throw new UnsupportedOperationException("method should be overwritten"); | ||
} | ||
|
||
/** | ||
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. | ||
* | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -543,7 +543,7 @@ private Value() {} | |
* | ||
* @throws IllegalStateException if {@code isNull()} or the value is not of the expected type | ||
*/ | ||
abstract List<Struct> getStructArray(); | ||
public abstract List<Struct> getStructArray(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @olavloite I made this method public. It surprising me that this was not public before, since users can |
||
|
||
@Override | ||
public String toString() { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clirr does not support Java 8 features, so it thinks these are breaking changes, where in fact we have provided default implementations for the added interface methods. No need for a major release here.