Skip to content

Commit

Permalink
handle int/long correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
edgao committed Jul 20, 2022
1 parent ad8f875 commit 0219384
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public JsonSchemaType getJsonType(final JDBCType jdbcType) {
case BIT, BOOLEAN -> JsonSchemaType.BOOLEAN;
case TINYINT, SMALLINT -> JsonSchemaType.INTEGER;
case INTEGER -> JsonSchemaType.INTEGER;
case BIGINT -> JsonSchemaType.INTEGER;
case BIGINT -> JsonSchemaType.NUMBER_BIGINT;
case FLOAT, DOUBLE -> JsonSchemaType.NUMBER;
case REAL -> JsonSchemaType.NUMBER;
case NUMERIC, DECIMAL -> JsonSchemaType.NUMBER;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ public JDBCType getFieldType(final JsonNode field) {
public JsonSchemaType getJsonType(final JDBCType jdbcType) {
return switch (jdbcType) {
case BOOLEAN -> JsonSchemaType.BOOLEAN;
case TINYINT, SMALLINT, INTEGER, BIGINT -> JsonSchemaType.INTEGER;
case TINYINT, SMALLINT, INTEGER -> JsonSchemaType.INTEGER;
case BIGINT -> JsonSchemaType.NUMBER_BIGINT;
case FLOAT, DOUBLE, REAL, NUMERIC, DECIMAL -> JsonSchemaType.NUMBER;
case BLOB, BINARY, VARBINARY, LONGVARBINARY -> JsonSchemaType.STRING_BASE_64;
case ARRAY -> JsonSchemaType.ARRAY;
Expand Down

0 comments on commit 0219384

Please sign in to comment.