Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,14 @@ private DataValue readValue(ResultSet result, int index, DataType type) throws S

private void bind(PreparedStatement statement, int index, DataValue value, SqlUserSchema.ColumnDefinition definition) throws SQLException {
if (value == null) statement.setObject(index, null);
else if (value.isString()) statement.setString(index, value.getString());
else if (value.isString()) {
// PostgreSQL's unknown parameter type lets the destination column
// parse the stored representation. This supports both ordinary text
// columns and deliberately retained numeric/boolean SQL columns whose
// public AdvancedCore value contract remains STRING.
if (dialect == Dialect.POSTGRESQL) statement.setObject(index, value.getString(), Types.OTHER);
else statement.setString(index, value.getString());
}
else if (value.isInt()) {
// PostgreSQL's unspecified parameter type is inferred from the target
// column. This preserves writes to both current integer columns and
Expand Down
Loading
Loading