1 5 package org.h2.result; 6 7 import java.io.IOException ; 8 9 import org.h2.value.Transfer; 10 11 14 public class ResultColumn { 15 String alias; 16 String schemaName; 17 String tableName; 18 String columnName; 19 int columnType; 20 long precision; 21 int scale; 22 int displaySize; 23 boolean autoIncrement; 24 int nullable; 25 26 ResultColumn(Transfer in) throws IOException { 27 alias = in.readString(); 28 schemaName = in.readString(); 29 tableName = in.readString(); 30 columnName = in.readString(); 31 columnType = in.readInt(); 32 precision = in.readLong(); 33 scale = in.readInt(); 34 displaySize = in.readInt(); 35 autoIncrement = in.readBoolean(); 36 nullable = in.readInt(); 37 } 38 39 public static void writeColumn(Transfer out, ResultInterface result, int i) throws IOException { 40 out.writeString(result.getAlias(i)); 41 out.writeString(result.getSchemaName(i)); 42 out.writeString(result.getTableName(i)); 43 out.writeString(result.getColumnName(i)); 44 out.writeInt(result.getColumnType(i)); 45 out.writeLong(result.getColumnPrecision(i)); 46 out.writeInt(result.getColumnScale(i)); 47 out.writeInt(result.getDisplaySize(i)); 48 out.writeBoolean(result.isAutoIncrement(i)); 49 out.writeInt(result.getNullable(i)); 50 } 51 } 52 | Popular Tags |