public interface SQLResult
Modifier and Type | Method and Description |
---|---|
Object |
getValue(int index)
Get the value at given index.
|
default <T> T |
getValue(SQLExecutionContext context,
int index)
Get the result value at given
index using current SQLValueDeserializer to obtain the value
in the expected type. |
default <T> T |
getValue(SQLExecutionContext context,
String name)
Get the result value with given
name using current SQLValueDeserializer to obtain the value
in the expected type. |
default <T> T |
getValue(SQLExecutionContext context,
com.holonplatform.core.TypedExpression<T> expression,
int index)
Get the result value at given
index , using given expression to provide the expected
value type and any other value deserialization strategy element, such as a converter, which can be used by
current SQLValueDeserializer . |
default <T> T |
getValue(SQLExecutionContext context,
com.holonplatform.core.TypedExpression<T> expression,
String name)
Get the result value with given
name , using given expression to provide the expected
value type and any other value deserialization strategy element, such as a converter, which can be used by
current SQLValueDeserializer . |
Object |
getValue(String name)
Get the value with given name.
|
int |
getValueCount()
Get the number of available result values.
|
Optional<String> |
getValueName(int index)
Get the result value name at given index, if available.
|
Object getValue(int index) throws SQLException
index
- Result value index, starting from 1
.SQLException
- Error retrieving the result valueObject getValue(String name) throws SQLException
name
- Resut value name (not null)SQLException
- Error retrieving the result valueint getValueCount() throws SQLException
SQLException
- If an error occurredOptional<String> getValueName(int index) throws SQLException
index
- Result value index, starting from 1
SQLException
- If an error occurreddefault <T> T getValue(SQLExecutionContext context, com.holonplatform.core.TypedExpression<T> expression, String name) throws SQLException
name
, using given expression
to provide the expected
value type and any other value deserialization strategy element, such as a converter, which can be used by
current SQLValueDeserializer
.T
- Expected value typecontext
- SQL execution context (not null)expression
- Expression (not null)name
- Result value name (not null)SQLException
- If an error occurreddefault <T> T getValue(SQLExecutionContext context, com.holonplatform.core.TypedExpression<T> expression, int index) throws SQLException
index
, using given expression
to provide the expected
value type and any other value deserialization strategy element, such as a converter, which can be used by
current SQLValueDeserializer
.T
- Expected value typecontext
- SQL execution context (not null)expression
- Expression (not null)index
- Result value index, starting from 1
.SQLException
- If an error occurreddefault <T> T getValue(SQLExecutionContext context, String name) throws SQLException
name
using current SQLValueDeserializer
to obtain the value
in the expected type.T
- Expected value typecontext
- SQL execution context (not null)name
- Result value name (not null)SQLException
- If an error occurreddefault <T> T getValue(SQLExecutionContext context, int index) throws SQLException
index
using current SQLValueDeserializer
to obtain the value
in the expected type.T
- Expected value typecontext
- SQL execution context (not null)index
- Result value index, starting from 1
SQLException
- If an error occurredCopyright © 2019 The Holon Platform. All rights reserved.