DbPlatformTypeLookup() { addAll(); }
/** * Return the type for a given jdbc type. */ public DbPlatformType get(int jdbcType) { return get(lookup.byId(jdbcType)); }
/** * Lookup the platform specific DbType given the standard sql type name. */ public DbPlatformType lookup(String name, boolean withScale) { DbType type = lookup.byName(name); if (type == null) { throw new IllegalArgumentException("Unknown type [" + name + "] - not standard sql type"); } // handle JSON types mapped to clob, blob and varchar switch (type) { case JSONBLOB: return get(DbType.BLOB); case JSONCLOB: return get(DbType.CLOB); case JSONVARCHAR: return get(DbType.VARCHAR); case JSON: return getJsonType(DbType.JSON, withScale); case JSONB: return getJsonType(DbType.JSONB, withScale); default: return get(type); } }