com.healthmarketscience.jackcess.Table.addRows()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(232)

本文整理了Java中com.healthmarketscience.jackcess.Table.addRows()方法的一些代码示例,展示了Table.addRows()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.addRows()方法的具体详情如下:
包路径:com.healthmarketscience.jackcess.Table
类名称:Table
方法名:addRows

Table.addRows介绍

[英]Add multiple rows to this table, only writing to disk after all rows have been written, and every time a data page is filled. This is much more efficient than calling #addRow multiple times.

Note, if this table has an auto-number column, the values written will be put back into the given row arrays (assuming the given row array is at least as long as the number of Columns in this Table).

Most exceptions thrown from this method will be wrapped with a BatchUpdateException which gives useful information in the case of a partially successful write.
[中]将多行添加到此表中,仅在写入所有行之后,以及每次填充数据页时,才将数据写入磁盘。这比多次调用#addRow要高效得多。
注意,如果此表有一个自动编号列,则写入的值将被放回给定的行数组中(假设给定的行数组至少与此表中的列数相同)。
此方法引发的大多数异常都将用BatchUpdateException包装,在部分成功写入的情况下,它会提供有用的信息。

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

void addRowsToTable( List<Object[]> rows ) throws IOException {
 table.addRows( rows );
}

代码示例来源:origin: net.sf.ucanaccess/ucanaccess

@Override
public List<? extends Object[]> addRows(List<? extends Object[]> rows) throws IOException {
  return wrapped.addRows(rows);
}

代码示例来源:origin: com.healthmarketscience.jackcess/jackcess

table.addRows(rows);
 rows.clear();
table.addRows(rows);

代码示例来源:origin: com.healthmarketscience.jackcess/jackcess

table.addRows(rows);
 rows.clear();
table.addRows(rows);

相关文章