java.lang.Object
io.helidon.dbclient.DbClientServiceContextImpl
- All Implemented Interfaces:
DbClientServiceContext
Interceptor context to get (and possibly manipulate) database operations.
This is a mutable object - acts as a builder during the invocation of DbClientService
.
The interceptors are executed sequentially, so there is no need for synchronization.
-
Method Summary
Modifier and TypeMethodDescriptioncontext()
Context with parameters passed from the caller, such asSpanContext
for tracing.Set a new context to be used by other interceptors and when executing the statement.dbType()
Type of this database (usually the same string used by theDbClientProvider.name()
).parameters
(List<Object> parameters) Set new indexed parameters to be used.parameters
(Map<String, Object> parameters) Set new named parameters to be used.A stage that is completed once the results were fully read.Text of the statement to be executed.Set a new statement to be used.Set a new statement with indexed parameters to be used.Set a new statement with named parameters to be used.A stage that is completed once the statement finishes execution.Name of a statement to be executed.statementName
(String name) Set a new statement name to be used.Get the statement parameters.Type of the statement being executed.
-
Method Details
-
context
Description copied from interface:DbClientServiceContext
Context with parameters passed from the caller, such asSpanContext
for tracing.- Specified by:
context
in interfaceDbClientServiceContext
- Returns:
- context associated with this request
-
statement
Description copied from interface:DbClientServiceContext
Text of the statement to be executed.- Specified by:
statement
in interfaceDbClientServiceContext
- Returns:
- statement text
-
statementName
Description copied from interface:DbClientServiceContext
Name of a statement to be executed. Ad hoc statements have names generated.- Specified by:
statementName
in interfaceDbClientServiceContext
- Returns:
- name of the statement
-
statementType
Description copied from interface:DbClientServiceContext
Type of the statement being executed.- Specified by:
statementType
in interfaceDbClientServiceContext
- Returns:
- statement type
-
statementParameters
Description copied from interface:DbClientServiceContext
Get the statement parameters.- Specified by:
statementParameters
in interfaceDbClientServiceContext
- Returns:
- statement parameters
-
dbType
Description copied from interface:DbClientServiceContext
Type of this database (usually the same string used by theDbClientProvider.name()
).- Specified by:
dbType
in interfaceDbClientServiceContext
- Returns:
- type of database
-
statementFuture
Description copied from interface:DbClientServiceContext
A stage that is completed once the statement finishes execution.- Specified by:
statementFuture
in interfaceDbClientServiceContext
- Returns:
- statement future
-
resultFuture
Description copied from interface:DbClientServiceContext
A stage that is completed once the results were fully read. The number returns either the number of modified records or the number of records actually read.- Specified by:
resultFuture
in interfaceDbClientServiceContext
- Returns:
- stage that completes once all query results were processed.
-
statement
Description copied from interface:DbClientServiceContext
Set a new statement with indexed parameters to be used.- Specified by:
statement
in interfaceDbClientServiceContext
- Parameters:
stmt
- statement textparameters
- indexed parameters- Returns:
- updated interceptor context
-
statement
Description copied from interface:DbClientServiceContext
Set a new statement with named parameters to be used.- Specified by:
statement
in interfaceDbClientServiceContext
- Parameters:
stmt
- statement textparameters
- named parameters- Returns:
- updated interceptor context
-
parameters
Description copied from interface:DbClientServiceContext
Set new indexed parameters to be used.- Specified by:
parameters
in interfaceDbClientServiceContext
- Parameters:
parameters
- parameters- Returns:
- updated interceptor context
-
parameters
Description copied from interface:DbClientServiceContext
Set new named parameters to be used.- Specified by:
parameters
in interfaceDbClientServiceContext
- Parameters:
parameters
- parameters- Returns:
- updated interceptor context
-
context
Description copied from interface:DbClientServiceContext
Set a new context to be used by other interceptors and when executing the statement.- Specified by:
context
in interfaceDbClientServiceContext
- Parameters:
context
- context to use- Returns:
- updated interceptor context
-
statement
Description copied from interface:DbClientServiceContext
Set a new statement to be used.- Specified by:
statement
in interfaceDbClientServiceContext
- Parameters:
name
- statement text to use- Returns:
- updated interceptor context
-
statementName
Description copied from interface:DbClientServiceContext
Set a new statement name to be used.- Specified by:
statementName
in interfaceDbClientServiceContext
- Parameters:
name
- statement name to use- Returns:
- updated interceptor context
-