Class StatementContext<T>
java.lang.Object
com.pyranid.StatementContext<T>
Data that represents a SQL statement.
- Since:
- 2.0.0
- Author:
- Mark Allen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder used to construct instances ofStatementContext. -
Method Summary
Modifier and TypeMethodDescriptionboolean@NonNull AmbiguousTimestampBindingStrategyHow should Pyranid bindInstantandOffsetDateTimeparameters when JDBC parameter metadata cannot identify whether the target isTIMESTAMPorTIMESTAMP WITH TIME ZONE?@NonNull DatabaseTypeGets the database type for this statement.Gets this statement's parameters rendered for diagnostics.@NonNull Statement@NonNull ZoneIdinthashCode()toString()static <T> @NonNull StatementContext.Builder<T>
-
Method Details
-
hashCode
-
equals
-
toString
-
getStatement
-
getParameters
-
getRedactedParameters
Gets this statement's parameters rendered for diagnostics.SecureParametervalues render as their masks. Other non-batch values are rendered through the configuredParameterRedactor. Batch executions render a bounded summary instead of individual group values.- Returns:
- parameters rendered for diagnostics
- Since:
- 4.4.0
-
getResultSetRowType
-
getDatabaseType
Gets the database type for this statement.If automatic database type detection is enabled and the type has not already been detected, this method may acquire a connection and inspect
DatabaseMetaData. Diagnostic methods such astoString(),equals(Object), andhashCode()use a non-detecting database-type value instead.- Returns:
- the database type
- Throws:
DatabaseException- if automatic database type detection fails- Since:
- 3.0.0
-
getTimeZone
-
getAmbiguousTimestampBindingStrategy
How should Pyranid bindInstantandOffsetDateTimeparameters when JDBC parameter metadata cannot identify whether the target isTIMESTAMPorTIMESTAMP WITH TIME ZONE?- Returns:
- behavior to use when timestamp target metadata is unavailable or non-identifying
- Since:
- 4.2.0
-
with
public static <T> @NonNull StatementContext.Builder<T> with(@NonNull Statement statement, @NonNull Database database)
-