com.clickhouse.r2dbc.ClickHouseColumnMetadata Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clickhouse-r2dbc Show documentation
Show all versions of clickhouse-r2dbc Show documentation
R2DBC driver for ClickHouse
package com.clickhouse.r2dbc;
import com.clickhouse.data.ClickHouseColumn;
import com.clickhouse.r2dbc.types.ClickHouseDataTypeWrapper;
import io.r2dbc.spi.ColumnMetadata;
import io.r2dbc.spi.Type;
public class ClickHouseColumnMetadata implements ColumnMetadata {
final Type type;
final String name;
ClickHouseColumnMetadata(ClickHouseColumn col) {
this.name = col.getColumnName(); // TODO :check alias handling.
this.type = ClickHouseDataTypeWrapper.of(col.getDataType());
}
@Override
public Type getType() {
return type;
}
@Override
public String getName() {
return name;
}
}