You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/io/r2dbc/mssql/OptionMapper.java
+21-1Lines changed: 21 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ public static OptionMapper create(ConnectionFactoryOptions options) {
59
59
* @param <T> inferred option type.
60
60
* @return the source object.
61
61
*/
62
-
public<T> Source<T> from(Option<T> option) {
62
+
publicSource<Object> from(Option<?> option) {
63
63
64
64
if (this.options.hasOption(option)) {
65
65
@@ -71,6 +71,26 @@ public <T> Source<T> from(Option<T> option) {
71
71
returnNullSource.instance();
72
72
}
73
73
74
+
/**
75
+
* Construct a new {@link Source} for a {@link Option} using type inference. Options without a value are not bound or mapped in the later stages of {@link Source}.
76
+
*
77
+
* @param option the option to apply.
78
+
* @param <T> inferred option type.
79
+
* @return the source object.
80
+
*/
81
+
@SuppressWarnings("unchecked")
82
+
public <T> Source<T> fromTyped(Option<T> option) {
0 commit comments