class RowDescription extends PGMessage {

    public static RowDescription loadFromPacket(byte[] packet) {
        PGProto proto = new PGProto(packet, 5);
        int colCount = proto.readInt16();
        if (colCount <= 0) {
            return new RowDescription();
        }
        PGColumn[] columns = new PGColumn[colCount];
        for (int i = 0; i < colCount; i++) {
            PGColumn column = new PGColumn();
            column.setName(proto.readNullStr());
            column.setTableOid(proto.readInt32());
            column.setColNo(proto.readInt16());
            column.setTypeOid(proto.readInt32());
            column.setTypeLen(proto.readInt16());
            column.setTypeMod(proto.readInt32());
            column.setFormat(proto.readInt16());
            columns[i] = column;
        }
        return new RowDescription(columns);
    }

    public  RowDescription();
    public  RowDescription(PGColumn[] columns);

}