1 10 11 package com.triactive.jdo.store; 12 13 import java.sql.ResultSet ; 14 import java.sql.Types ; 15 16 17 23 24 class PostgreSQLTypeInfo extends TypeInfo 25 { 26 27 public static final int MAX_PRECISION = 65000; 28 29 30 40 41 public PostgreSQLTypeInfo(ResultSet rs) 42 { 43 super(rs); 44 45 53 54 if (typeName.equalsIgnoreCase("varchar")) 55 { 56 61 precision = MAX_PRECISION; 62 } 63 else if (typeName.equalsIgnoreCase("numeric")) 64 { 65 precision = 64; } 67 else if (typeName.equalsIgnoreCase("text")) 68 { 69 70 dataType = Types.LONGVARCHAR; 71 } 72 else if (typeName.equalsIgnoreCase("bytea")) 73 { 74 75 dataType = Types.LONGVARBINARY; 76 } 77 78 if (precision > MAX_PRECISION) 79 precision = MAX_PRECISION; 80 } 81 } 82 | Popular Tags |