All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.yandex.clickhouse.response.ClickHouseResponse Maven / Gradle / Ivy

There is a newer version: 0.3.2
Show newest version
package ru.yandex.clickhouse.response;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

import java.util.List;

/**
 * Object for jackson for ClickHouse response
 */
public class ClickHouseResponse {
    private List meta;
    @JsonDeserialize(contentUsing = ArrayToStringDeserializer.class)
    private List> data;
    @JsonDeserialize(using = ArrayToStringDeserializer.class)
    private List totals;
    private Extremes extremes;
    private int rows;
    private int rows_before_limit_at_least;


    public static class Extremes {
        @JsonDeserialize(using = ArrayToStringDeserializer.class)
        private List min;
        @JsonDeserialize(using = ArrayToStringDeserializer.class)
        private List max;

        public List getMin() {
            return min;
        }

        public void setMin(List min) {
            this.min = min;
        }

        public List getMax() {
            return max;
        }

        public void setMax(List max) {
            this.max = max;
        }
    }

    public static class Meta {
        private String name;
        private String type;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        @Override
        public String toString() {
            return "Meta{" +
                    "name='" + name + '\'' +
                    ", type='" + type + '\'' +
                    '}';
        }
    }

    public Extremes getExtremes() {
        return extremes;
    }

    public void setExtremes(Extremes extremes) {
        this.extremes = extremes;
    }

    public List getMeta() {
        return meta;
    }

    public void setMeta(List meta) {
        this.meta = meta;
    }

    public List> getData() {
        return data;
    }

    public void setData(List> data) {
        this.data = data;
    }

    public int getRows() {
        return rows;
    }

    public void setRows(int rows) {
        this.rows = rows;
    }

    public int getRows_before_limit_at_least() {
        return rows_before_limit_at_least;
    }

    public void setRows_before_limit_at_least(int rows_before_limit_at_least) {
        this.rows_before_limit_at_least = rows_before_limit_at_least;
    }

    public List getTotals() {
        return totals;
    }

    public void setTotals(List totals) {
        this.totals = totals;
    }

    @Override
    public String toString() {
        return "ClickHouseResponse{" +
                "meta=" + meta +
                ", data=" + data +
                ", rows=" + rows +
                ", rows_before_limit_at_least=" + rows_before_limit_at_least +
                '}';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy