- java.lang.Object
-
- io.helidon.dbclient.mongodb.MongoDbStatementGet
-
- All Implemented Interfaces:
DbStatement<DbStatementGet,Single<Optional<DbRow>>>
,DbStatementGet
public class MongoDbStatementGet extends Object implements DbStatementGet
Statement for GET operation in mongoDB.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MongoDbStatementGet
addParam(Object parameter)
Add next parameter to the list of ordered parameters (e.g.MongoDbStatementGet
addParam(String name, Object parameter)
Add next parameter to the map of named parameters (e.g.Single<Optional<DbRow>>
execute()
Execute this statement using the parameters configured withparams
andaddParams
methods.MongoDbStatementGet
indexedParam(Object parameters)
Configure parameters usingObject
instance with registered mapper.MongoDbStatementGet
namedParam(Object parameters)
Configure parameters usingObject
instance with registered mapper.MongoDbStatementGet
params(List<?> parameters)
Configure parameters from aList
by order.MongoDbStatementGet
params(Map<String,?> parameters)
Configure named parameters.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.helidon.dbclient.DbStatement
params
-
-
-
-
Method Detail
-
params
public MongoDbStatementGet params(List<?> parameters)
Description copied from interface:DbStatement
Configure parameters from aList
by order. The statement must use indexed parameters and configure them by order in the provided array.- Specified by:
params
in interfaceDbStatement<DbStatementGet,Single<Optional<DbRow>>>
- Parameters:
parameters
- ordered parameters to set on this statement, never null- Returns:
- updated db statement
-
params
public MongoDbStatementGet params(Map<String,?> parameters)
Description copied from interface:DbStatement
Configure named parameters. The statement must use named parameters and configure them from the provided map.- Specified by:
params
in interfaceDbStatement<DbStatementGet,Single<Optional<DbRow>>>
- Parameters:
parameters
- named parameters to set on this statement- Returns:
- updated db statement
-
namedParam
public MongoDbStatementGet namedParam(Object parameters)
Description copied from interface:DbStatement
Configure parameters usingObject
instance with registered mapper. The statement must use named parameters and configure them from the map provided by mapper.- Specified by:
namedParam
in interfaceDbStatement<DbStatementGet,Single<Optional<DbRow>>>
- Parameters:
parameters
-Object
instance containing parameters- Returns:
- updated db statement
-
indexedParam
public MongoDbStatementGet indexedParam(Object parameters)
Description copied from interface:DbStatement
Configure parameters usingObject
instance with registered mapper. The statement must use indexed parameters and configure them by order in the array provided by mapper.- Specified by:
indexedParam
in interfaceDbStatement<DbStatementGet,Single<Optional<DbRow>>>
- Parameters:
parameters
-Object
instance containing parameters- Returns:
- updated db statement
-
addParam
public MongoDbStatementGet addParam(Object parameter)
Description copied from interface:DbStatement
Add next parameter to the list of ordered parameters (e.g. the ones that use?
in SQL).- Specified by:
addParam
in interfaceDbStatement<DbStatementGet,Single<Optional<DbRow>>>
- Parameters:
parameter
- next parameter to set on this statement- Returns:
- updated db statement
-
addParam
public MongoDbStatementGet addParam(String name, Object parameter)
Description copied from interface:DbStatement
Add next parameter to the map of named parameters (e.g. the ones that use:name
in Helidon JDBC SQL integration).- Specified by:
addParam
in interfaceDbStatement<DbStatementGet,Single<Optional<DbRow>>>
- Parameters:
name
- name of parameterparameter
- value of parameter- Returns:
- updated db statement
-
execute
public Single<Optional<DbRow>> execute()
Description copied from interface:DbStatement
Execute this statement using the parameters configured withparams
andaddParams
methods.- Specified by:
execute
in interfaceDbStatement<DbStatementGet,Single<Optional<DbRow>>>
- Returns:
- The result of this statement, never blocking.
-
-