本文整理了Java中com.healthmarketscience.jackcess.Table.getIndexes()
方法的一些代码示例,展示了Table.getIndexes()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.getIndexes()
方法的具体详情如下:
包路径:com.healthmarketscience.jackcess.Table
类名称:Table
方法名:getIndexes
暂无
代码示例来源:origin: net.sf.ucanaccess/ucanaccess
@Override
public List<? extends Index> getIndexes() {
return wrapped.getIndexes();
}
代码示例来源:origin: net.sf.ucanaccess/ucanaccess
public static boolean hasPrimaryKey(Table _table) {
for (Index idx : _table.getIndexes()) {
if (idx.isPrimaryKey()) {
return true;
}
}
return false;
}
代码示例来源:origin: net.sf.ucanaccess/ucanaccess
public Index getBestIndex() {
if (this.bestIndex == null) {
List<? extends Index> li = table.getIndexes();
for (Index idx : li) {
if (idx.isPrimaryKey()) {
this.bestIndex = idx;
this.primaryCursor = true;
break;
}
}
if (this.bestIndex == null) {
for (Index idx : li) {
if (idx.isUnique()) {
this.bestIndex = idx;
break;
}
}
}
if (this.bestIndex == null && li.size() == 1) {
this.bestIndex = li.get(0);
}
}
return this.bestIndex;
}
代码示例来源:origin: io.github.codemumbler/mdb-oracle-converter
private boolean isPrimaryColumn(String tableName, com.healthmarketscience.jackcess.Column originalColumn) throws IOException {
for (Index index : jackcessDatabase.getTable(tableName).getIndexes()) {
if (index.isPrimaryKey()) {
for (Index.Column indexColumn : index.getColumns()) {
if (indexColumn.getName().equals(originalColumn.getName())) {
return true;
}
}
}
}
boolean hasPrimaryKey = false;
for (Index index : jackcessDatabase.getTable(tableName).getIndexes()) {
if (index.isPrimaryKey()) {
hasPrimaryKey = true;
}
}
return originalColumn.isAutoNumber() && !hasPrimaryKey;
}
内容来源于网络,如有侵权,请联系作者删除!