本文整理了Java中com.healthmarketscience.jackcess.Table.getColumnCount()
方法的一些代码示例,展示了Table.getColumnCount()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.getColumnCount()
方法的具体详情如下:
包路径:com.healthmarketscience.jackcess.Table
类名称:Table
方法名:getColumnCount
暂无
代码示例来源:origin: com.healthmarketscience.jackcess/jackcess
private Object[] newRowArray() {
Object[] row = new Object[_flatTable.getColumnCount() + 1];
row[row.length - 1] = ColumnImpl.RETURN_ROW_ID;
return row;
}
代码示例来源:origin: net.sf.ucanaccess/ucanaccess
@Override
public int getColumnCount() {
return wrapped.getColumnCount();
}
代码示例来源:origin: ujmp/universal-java-matrix-package
public long[] getSize() {
size[ROW] = table.getRowCount();
size[COLUMN] = table.getColumnCount();
return size;
}
代码示例来源:origin: com.healthmarketscience.jackcess/jackcess
private static void nullSecondaryValues(Joiner joiner, Object[] oldFromRow)
throws IOException
{
IndexCursor toCursor = joiner.getToCursor();
List<? extends Index.Column> fromCols = joiner.getColumns();
List<? extends Index.Column> toCols = joiner.getToIndex().getColumns();
Object[] toRow = new Object[joiner.getToTable().getColumnCount()];
for(Iterator<Row> iter = joiner.findRows(oldFromRow)
.setColumnNames(Collections.<String>emptySet())
.iterator(); iter.hasNext(); ) {
iter.next();
// create update row for "to" table
Arrays.fill(toRow, Column.KEEP_VALUE);
for(int i = 0; i < fromCols.size(); ++i) {
toCols.get(i).getColumn().setRowValue(toRow, null);
}
toCursor.updateCurrentRow(toRow);
}
}
代码示例来源:origin: com.healthmarketscience.jackcess/jackcess
private static void updateSecondaryValues(Joiner joiner, Object[] oldFromRow,
Object[] newFromRow)
throws IOException
{
IndexCursor toCursor = joiner.getToCursor();
List<? extends Index.Column> fromCols = joiner.getColumns();
List<? extends Index.Column> toCols = joiner.getToIndex().getColumns();
Object[] toRow = new Object[joiner.getToTable().getColumnCount()];
for(Iterator<Row> iter = joiner.findRows(oldFromRow)
.setColumnNames(Collections.<String>emptySet())
.iterator(); iter.hasNext(); ) {
iter.next();
// create update row for "to" table
Arrays.fill(toRow, Column.KEEP_VALUE);
for(int i = 0; i < fromCols.size(); ++i) {
Object val = fromCols.get(i).getColumn().getRowValue(newFromRow);
toCols.get(i).getColumn().setRowValue(toRow, val);
}
toCursor.updateCurrentRow(toRow);
}
}
代码示例来源:origin: AccelerationNet/access2csv
static int export(Database db, String tableName, Writer csv, boolean withHeader, boolean applyQuotesToAll, String nullText) throws IOException{
Table table = db.getTable(tableName);
String[] buffer = new String[table.getColumnCount()];
CSVWriter writer = new CSVWriter(new BufferedWriter(csv), CSVWriter.DEFAULT_SEPARATOR, CSVWriter.DEFAULT_QUOTE_CHARACTER);
int rows = 0;
try{
if (withHeader) {
int x = 0;
for(Column col : table.getColumns()){
buffer[x++] = col.getName();
}
writer.writeNext(buffer, applyQuotesToAll);
}
for(Row row : table){
int i = 0;
for (Object object : row.values()) {
buffer[i++] = object == null ? nullText : object.toString();
}
writer.writeNext(buffer, applyQuotesToAll);
rows++;
}
}finally{
writer.close();
}
return rows;
}
代码示例来源:origin: com.healthmarketscience.jackcess/jackcess
int numColumns = table.getColumnCount();
内容来源于网络,如有侵权,请联系作者删除!