| 1 |
package SQLite.JDBC2; |
| 2 |
|
| 3 |
import java.sql.Types; |
| 4 |
|
| 5 |
public class TableResultX extends SQLite.TableResult { |
| 6 |
public int sql_type[]; |
| 7 |
|
| 8 |
public TableResultX() { |
| 9 |
super(); |
| 10 |
sql_type = new int[this.ncolumns]; |
| 11 |
for (int i = 0; i < this.ncolumns; i++) { |
| 12 |
sql_type[i] = Types.VARCHAR; |
| 13 |
} |
| 14 |
} |
| 15 |
|
| 16 |
public TableResultX(int maxrows) { |
| 17 |
super(maxrows); |
| 18 |
sql_type = new int[this.ncolumns]; |
| 19 |
for (int i = 0; i < this.ncolumns; i++) { |
| 20 |
sql_type[i] = Types.VARCHAR; |
| 21 |
} |
| 22 |
} |
| 23 |
|
| 24 |
public TableResultX(SQLite.TableResult tr) { |
| 25 |
this.column = tr.column; |
| 26 |
this.rows = tr.rows; |
| 27 |
this.ncolumns = tr.ncolumns; |
| 28 |
this.nrows = tr.nrows; |
| 29 |
this.types = tr.types; |
| 30 |
this.maxrows = tr.maxrows; |
| 31 |
sql_type = new int[tr.ncolumns]; |
| 32 |
for (int i = 0; i < this.ncolumns; i++) { |
| 33 |
sql_type[i] = Types.VARCHAR; |
| 34 |
} |
| 35 |
if (tr.types != null) { |
| 36 |
for (int i = 0; i < tr.types.length; i++) { |
| 37 |
sql_type[i] = JDBCDatabaseMetaData.mapSqlType(tr.types[i]); |
| 38 |
} |
| 39 |
} |
| 40 |
} |
| 41 |
|
| 42 |
void sql_types(int types[]) { |
| 43 |
sql_type = types; |
| 44 |
} |
| 45 |
} |