APISonar


io.ebean.config.dbplatform.DbPlatformType.JSON

> io > ebean > config > dbplatform > DbPlatformType > JSON
io APIs ebean APIs config APIs dbplatform APIs DbPlatformType APIs JSON APIs

Example 1
private int getDbJsonStorage(DbJsonType dbJsonType) {

    switch (dbJsonType) {
      case JSONB:
        return DbPlatformType.JSONB;
      case VARCHAR:
        return Types.VARCHAR;
      case CLOB:
        return Types.CLOB;
      case BLOB:
        return Types.BLOB;
      default:
        return DbPlatformType.JSON;
    }
  }
Example 2
public static ScalarType<?> typeFor(boolean postgres, int dbType, DocPropertyType docType) {
    if (postgres) {
      switch (dbType) {
        case DbPlatformType.JSONB:
          return new ScalarTypeJsonList.JsonB(docType);
        case DbPlatformType.JSON:
          return new ScalarTypeJsonList.Json(docType);
      }
    }
    return new ScalarTypeJsonList.Varchar(docType);
  }
Example 3
public static ScalarType<?> typeFor(boolean postgres, int dbType, DocPropertyType docPropertyType) {
    if (postgres) {
      switch (dbType) {
        case DbPlatformType.JSONB:
          return new ScalarTypeJsonSet.JsonB(docPropertyType);
        case DbPlatformType.JSON:
          return new ScalarTypeJsonSet.Json(docPropertyType);
      }
    }
    return new ScalarTypeJsonSet.Varchar(docPropertyType);
  }