Class PreparedStatements
java.lang.Object
gov.nasa.jpl.aerie.merlin.server.remotes.postgres.PreparedStatements
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumSerialization format for postgres intervals (what we call Durations) -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<gov.nasa.jpl.aerie.merlin.driver.SimulationFailure> getFailureReason(ResultSet results, int column) static voidsetDuration(PreparedStatement statement, int parameter, gov.nasa.jpl.aerie.merlin.protocol.types.Duration argument) static voidsetFailureReason(PreparedStatement statement, int parameter, gov.nasa.jpl.aerie.merlin.driver.SimulationFailure reason) static voidsetIntervalStyle(Connection connection, PreparedStatements.PGIntervalStyle style) Sets the serialization format for postgres intervals.static voidsetParameters(PreparedStatement statement, int parameter, List<gov.nasa.jpl.aerie.merlin.protocol.model.InputType.Parameter> parameters) static voidsetRequiredParameters(PreparedStatement statement, int parameter, List<String> requiredParameters) static voidsetTimestamp(PreparedStatement statement, int parameter, gov.nasa.jpl.aerie.types.Timestamp argument) static voidsetValidationResponse(PreparedStatement statement, int parameter, MissionModelService.BulkArgumentValidationResponse response)
-
Method Details
-
setIntervalStyle
public static void setIntervalStyle(Connection connection, PreparedStatements.PGIntervalStyle style) throws SQLException Sets the serialization format for postgres intervals. Call this before any statement that requires intervals to be serialized.- Throws:
SQLException
-
setTimestamp
public static void setTimestamp(PreparedStatement statement, int parameter, gov.nasa.jpl.aerie.types.Timestamp argument) throws SQLException - Throws:
SQLException
-
setDuration
public static void setDuration(PreparedStatement statement, int parameter, gov.nasa.jpl.aerie.merlin.protocol.types.Duration argument) throws SQLException - Throws:
SQLException
-
setParameters
public static void setParameters(PreparedStatement statement, int parameter, List<gov.nasa.jpl.aerie.merlin.protocol.model.InputType.Parameter> parameters) throws SQLException - Throws:
SQLException
-
setRequiredParameters
public static void setRequiredParameters(PreparedStatement statement, int parameter, List<String> requiredParameters) throws SQLException - Throws:
SQLException
-
setValidationResponse
public static void setValidationResponse(PreparedStatement statement, int parameter, MissionModelService.BulkArgumentValidationResponse response) throws SQLException - Throws:
SQLException
-
setFailureReason
public static void setFailureReason(PreparedStatement statement, int parameter, gov.nasa.jpl.aerie.merlin.driver.SimulationFailure reason) throws SQLException - Throws:
SQLException
-
getFailureReason
public static Optional<gov.nasa.jpl.aerie.merlin.driver.SimulationFailure> getFailureReason(ResultSet results, int column) throws SQLException - Throws:
SQLException
-