package io.ebeaninternal.server.type;
import org.postgresql.util.PGobject;
import java.sql.SQLException;
public class PostgresHelper {
public static final String JSON_TYPE = "json";
public static final String JSONB_TYPE = "jsonb";
public static final String INET_TYPE = "inet";
public static Object asInet(String value) throws SQLException {
return asObject(INET_TYPE, value);
}
public static Object asObject(String pgType, String rawJson) throws SQLException {
PGobject pgo = new PGobject();
pgo.setType(pgType);
pgo.setValue(rawJson);
return pgo;
}
}