Uses of Class
com.pyranid.StatementContext
-
Uses of StatementContext in com.pyranid
Methods in com.pyranid that return StatementContextModifier and TypeMethodDescription@NonNull StatementContextStatementContext.Builder.build()@NonNull StatementContext<T> StatementLog.getStatementContext()The SQL statement that was executed.Methods in com.pyranid with parameters of type StatementContextModifier and TypeMethodDescription@NonNull CustomParameterBinder.BindingResultCustomParameterBinder.bind(@NonNull StatementContext<?> statementContext, @NonNull PreparedStatement preparedStatement, @NonNull Integer parameterIndex, @NonNull Object parameter) Performs custom binding of aPreparedStatementvalue given avalueand itsindexwhenCustomParameterBinder.appliesTo(TargetType)istrue.default @NonNull CustomParameterBinder.BindingResultCustomParameterBinder.bindNull(@NonNull StatementContext<?> statementContext, @NonNull PreparedStatement preparedStatement, @NonNull Integer parameterIndex, @NonNull TargetType targetType, @NonNull Integer sqlType) Performs custom binding of a null value given itsindexandtargetType.<T> voidPreparedStatementBinder.bindParameter(@NonNull StatementContext<T> statementContext, @NonNull PreparedStatement preparedStatement, @NonNull Integer parameterIndex, @NonNull Object parameter) Binds a single parameter to a SQL prepared statement.voidPreparedStatementCustomizer.customize(@NonNull StatementContext<?> statementContext, @NonNull PreparedStatement preparedStatement) Applies customization to the prepared statement before execution.default voidMetricsCollector.didAcquireStatementConnection(@NonNull StatementContext<?> ctx, @NonNull Duration acquisitionDuration) Called after Pyranid successfully acquires a statement-scopedConnection.default voidMetricsCollector.didCloseStream(@NonNull StatementContext<?> ctx, @NonNull MetricsCollector.StreamTerminalOutcome outcome, @NonNull Long rowsConsumed, @NonNull Duration streamDuration, @Nullable Throwable throwable) Called after an opened stream reaches a terminal state.default voidMetricsCollector.didExecuteStatement(@NonNull StatementContext<?> ctx, @NonNull StatementLog<?> statementLog, @NonNull StatementResult result) Called after Pyranid successfully executes a statement.default voidMetricsCollector.didFailToAcquireStatementConnection(@NonNull StatementContext<?> ctx, @NonNull DatabaseType databaseType, @NonNull Duration acquisitionDuration, @NonNull Throwable throwable) Called after Pyranid fails to acquire a statement-scopedConnection.default voidMetricsCollector.didFailToExecuteStatement(@NonNull StatementContext<?> ctx, @NonNull StatementLog<?> statementLog, @NonNull DatabaseType databaseType, @NonNull Throwable throwable) Called after Pyranid fails to execute a statement.default voidMetricsCollector.didFailToOpenStream(@NonNull StatementContext<?> ctx, @NonNull DatabaseType databaseType, @NonNull Duration openDuration, @NonNull Throwable throwable) Called after Pyranid fails to open a streaming statement.default voidMetricsCollector.didFailToReleaseStatementConnection(@NonNull StatementContext<?> ctx, @NonNull Duration heldDuration, @NonNull Throwable throwable) Called after Pyranid fails to release a statement-scopedConnection.default voidMetricsCollector.didOpenStream(@NonNull StatementContext<?> ctx, @NonNull Duration openDuration) Called after Pyranid successfully opens a streaming statement.default voidMetricsCollector.didReleaseStatementConnection(@NonNull StatementContext<?> ctx, @NonNull Duration heldDuration) Called after Pyranid successfully releases a statement-scopedConnection.@NonNull CustomColumnMapper.MappingResultCustomColumnMapper.map(@NonNull StatementContext<?> statementContext, @NonNull ResultSet resultSet, @NonNull Object resultSetValue, @NonNull TargetType targetType, @NonNull Integer columnIndex, @Nullable String columnLabel, @NonNull InstanceProvider instanceProvider) Perform custom mapping of aResultSetcolumn: given aresultSetValue, optionally return an instance oftargetTypeinstead.<T> @NonNull Optional<T> ResultSetMapper.map(@NonNull StatementContext<T> statementContext, @NonNull ResultSet resultSet, @NonNull Class<T> resultSetRowType, @NonNull InstanceProvider instanceProvider) Maps the current row ofresultSetto the result class indicated bystatementContext.default <T> @NonNull TInstanceProvider.provide(@NonNull StatementContext<T> statementContext, @NonNull Class<T> instanceType) Provides an instance of the giveninstanceType.default <T extends Record>
@NonNull TInstanceProvider.provideRecord(@NonNull StatementContext<T> statementContext, @NonNull Class<T> recordType, Object @Nullable ... initargs) Provides an instance of the givenrecordType.default voidMetricsCollector.willAcquireStatementConnection(@NonNull StatementContext<?> ctx) Called immediately before Pyranid attempts to acquire a statement-scopedConnection.default voidMetricsCollector.willExecuteStatement(@NonNull StatementContext<?> ctx) Called immediately before Pyranid executes a statement.default voidMetricsCollector.willOpenStream(@NonNull StatementContext<?> ctx) Called immediately before Pyranid opens a streaming statement.static <T> @NonNull StatementLog.BuilderStatementLog.withStatementContext(@NonNull StatementContext<T> statementContext) Creates aStatementLogbuilder for the givenstatementContext.