class PostgresFieldPath implements FieldPath {

    public static PostgresFieldPath fromString(final String path)
            throws QueryBuildException {
        if (!FieldPath.isValid(path)) {
            throw new QueryBuildException("Invalid field path: " + path);
        }

        // TODO: add a special support for ID column (it depends on collection name)
//        if (path.equals("id")) {
//            return new PostgresFieldPath(PostgresSchema.ID_COLUMN, Schema.ID_TO_JSONB_CAST_FUNCTION);
//        }

        return new PostgresFieldPath(FieldPath.splitParts(path));
    }

    private  PostgresFieldPath(final String[] parts);
    private  PostgresFieldPath(final String column, final String castFunction);

}