| Modifier and Type | Method and Description |
|---|---|
Statement |
add()
Save the current binding and create a new one.
|
Statement |
bind(int index,
Object value)
Bind a non-
null value to an indexed parameter. |
Statement |
bind(String name,
Object value)
Bind a non-
null to a named parameter. |
Statement |
bindNull(int index,
Class<?> type)
Bind a
null value to an indexed parameter. |
Statement |
bindNull(String name,
Class<?> type)
Bind a
null value to a named parameter. |
Publisher<? extends Result> |
execute()
Executes one or more SQL statements and returns the
Results. |
default Statement |
fetchSize(int rows)
Configures
Statement to retrieve a fixed number of rows when fetching results from a query instead deriving fetch size from back pressure. |
default Statement |
returnGeneratedValues(String... columns)
|
Statement add()
StatementIllegalStateException - if the statement is parametrized and not all parameter values are providedStatement bind(int index, Object value)
null value to an indexed parameter. Indexes are zero-based.index - the index to bind tovalue - the value to bindStatementIllegalArgumentException - if value is nullIndexOutOfBoundsException - if the parameter index is out of rangeStatement bind(String name, Object value)
null to a named parameter.name - the name of identifier to bind tovalue - the value to bindStatementIllegalArgumentException - if name or value is nullStatement bindNull(int index, Class<?> type)
null value to an indexed parameter. Indexes are zero-based.index - the index to bind totype - the type of null valueStatementIllegalArgumentException - if type is nullIndexOutOfBoundsException - if the parameter index is out of rangeStatement bindNull(String name, Class<?> type)
null value to a named parameter.name - the name of identifier to bind totype - the type of null valueStatementIllegalArgumentException - if name or type is nullPublisher<? extends Result> execute()
Results.
Result objects must be fully consumed to ensure full execution of the Statement.Results, returned by each statementIllegalStateException - if the statement is parametrized and not all parameter values are provideddefault Statement returnGeneratedValues(String... columns)
Statement to return the generated values from any rows created by this Statement in the Result returned from execute(). If no columns are specified,
implementations are free to choose which columns will be returned. If called multiple times, only the columns requested in the final invocation will be returned.
The default implementation of this method is a no-op.
columns - the names of the columns to returnStatementIllegalArgumentException - if columns, or any item in columns is nulldefault Statement fetchSize(int rows)
Statement to retrieve a fixed number of rows when fetching results from a query instead deriving fetch size from back pressure. If called multiple times, only the fetch
size configured in the final invocation will be applied. If the value specified is zero, then the hint is ignored.
The default implementation of this method is a no op and the default value is zero.
rows - the number of rows to fetchStatementCopyright © 2019. All rights reserved.