13c827367444ee418f129b2c238299f49d3264554Jarkko Poyrypackage SQLite.JDBC2z; 23c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 33c827367444ee418f129b2c238299f49d3264554Jarkko Poyryimport java.sql.Types; 43c827367444ee418f129b2c238299f49d3264554Jarkko Poyryimport java.util.Vector; 53c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 63c827367444ee418f129b2c238299f49d3264554Jarkko Poyrypublic class TableResultX extends SQLite.TableResult { 73c827367444ee418f129b2c238299f49d3264554Jarkko Poyry public int sql_type[]; 83c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 93c827367444ee418f129b2c238299f49d3264554Jarkko Poyry public TableResultX() { 103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry super(); 113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry sql_type = new int[this.ncolumns]; 123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for (int i = 0; i < this.ncolumns; i++) { 133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry sql_type[i] = Types.VARCHAR; 143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry public TableResultX(int maxrows) { 183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry super(maxrows); 193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry sql_type = new int[this.ncolumns]; 203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for (int i = 0; i < this.ncolumns; i++) { 213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry sql_type[i] = Types.VARCHAR; 223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 233c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry public TableResultX(SQLite.TableResult tr) { 263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry this.column = tr.column; 273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry this.rows = tr.rows; 283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry this.ncolumns = tr.ncolumns; 293c827367444ee418f129b2c238299f49d3264554Jarkko Poyry this.nrows = tr.nrows; 303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry this.types = tr.types; 313c827367444ee418f129b2c238299f49d3264554Jarkko Poyry this.maxrows = tr.maxrows; 323c827367444ee418f129b2c238299f49d3264554Jarkko Poyry sql_type = new int[tr.ncolumns]; 333c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for (int i = 0; i < this.ncolumns; i++) { 343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry sql_type[i] = Types.VARCHAR; 353c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 363c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if (tr.types != null) { 373c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for (int i = 0; i < tr.types.length; i++) { 383c827367444ee418f129b2c238299f49d3264554Jarkko Poyry sql_type[i] = JDBCDatabaseMetaData.mapSqlType(tr.types[i]); 393c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 403c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 413c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 423c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 433c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void sql_types(int types[]) { 443c827367444ee418f129b2c238299f49d3264554Jarkko Poyry sql_type = types; 453c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 463c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} 473c827367444ee418f129b2c238299f49d3264554Jarkko Poyry