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

com.clickhouse.jdbc.ClickHouseStruct Maven / Gradle / Ivy

There is a newer version: 0.7.1-patch1
Show newest version
package com.clickhouse.jdbc;

import java.sql.SQLException;
import java.sql.Struct;
import java.util.Map;

import com.clickhouse.client.ClickHouseChecker;

public class ClickHouseStruct implements Struct {
    private final String typeName;
    private final Object[] values;

    protected ClickHouseStruct(String typeName, Object[] values) {
        this.typeName = ClickHouseChecker.nonNull(typeName, "SQLTypeName");
        this.values = ClickHouseChecker.nonNull(values, "values");
    }

    @Override
    public String getSQLTypeName() throws SQLException {
        return typeName;
    }

    @Override
    public Object[] getAttributes() throws SQLException {
        return values;
    }

    @Override
    public Object[] getAttributes(Map> map) throws SQLException {
        return getAttributes();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy