package io.vertx.pgclient.impl.codec;
import io.vertx.sqlclient.desc.ColumnDescriptor;
import java.sql.JDBCType;
class PgColumnDesc implements ColumnDescriptor {
public static final PgColumnDesc[] EMPTY_COLUMNS = new PgColumnDesc[0];
final String name;
final int relationId;
final DataType dataType;
final DataFormat dataFormat;
final short relationAttributeNo;
final short length;
final int typeModifier;
PgColumnDesc(String name, int relationId, short relationAttributeNo, DataType dataType, short length, int typeModifier, DataFormat dataFormat) {
this.name = name;
this.dataType = dataType;
this.dataFormat = dataFormat;
this.length = length;
this.relationId = relationId;
this.relationAttributeNo = relationAttributeNo;
this.typeModifier = typeModifier;
}
@Override
public String name() {
return name;
}
@Override
public boolean isArray() {
return dataType.array;
}
@Override
public JDBCType jdbcType() {
return dataType.jdbcType;
}
}