- 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 MongoDbStatementGetaddParam(Object parameter)Add next parameter to the list of ordered parameters (e.g.MongoDbStatementGetaddParam(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 withparamsandaddParamsmethods.MongoDbStatementGetindexedParam(Object parameters)Configure parameters usingObjectinstance with registered mapper.MongoDbStatementGetnamedParam(Object parameters)Configure parameters usingObjectinstance with registered mapper.MongoDbStatementGetparams(List<?> parameters)Configure parameters from aListby order.MongoDbStatementGetparams(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:DbStatementConfigure parameters from aListby order. The statement must use indexed parameters and configure them by order in the provided array.- Specified by:
paramsin 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:DbStatementConfigure named parameters. The statement must use named parameters and configure them from the provided map.- Specified by:
paramsin 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:DbStatementConfigure parameters usingObjectinstance with registered mapper. The statement must use named parameters and configure them from the map provided by mapper.- Specified by:
namedParamin interfaceDbStatement<DbStatementGet,Single<Optional<DbRow>>>- Parameters:
parameters-Objectinstance containing parameters- Returns:
- updated db statement
-
indexedParam
public MongoDbStatementGet indexedParam(Object parameters)
Description copied from interface:DbStatementConfigure parameters usingObjectinstance with registered mapper. The statement must use indexed parameters and configure them by order in the array provided by mapper.- Specified by:
indexedParamin interfaceDbStatement<DbStatementGet,Single<Optional<DbRow>>>- Parameters:
parameters-Objectinstance containing parameters- Returns:
- updated db statement
-
addParam
public MongoDbStatementGet addParam(Object parameter)
Description copied from interface:DbStatementAdd next parameter to the list of ordered parameters (e.g. the ones that use?in SQL).- Specified by:
addParamin 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:DbStatementAdd next parameter to the map of named parameters (e.g. the ones that use:namein Helidon JDBC SQL integration).- Specified by:
addParamin 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:DbStatementExecute this statement using the parameters configured withparamsandaddParamsmethods.- Specified by:
executein interfaceDbStatement<DbStatementGet,Single<Optional<DbRow>>>- Returns:
- The result of this statement, never blocking.
-
-