您好,有关于如何
<dependency>
<groupId>org.jetbrains.xodus</groupId>
<artifactId>xodus-query</artifactId>
<version>1.2.3</version>
</dependency>
具体来说,
UniqueKeyIndicesEngine
用来索引实体。例如,这段代码:
getEntityStore().executeInTransaction(new StoreTransactionalExecutable() {
@Override
public void execute(@NotNull StoreTransaction txn) {
final PersistentStoreTransaction t = (PersistentStoreTransaction) txn;
entity1.setProperty("column0", 1);
entity1.setProperty("column1", "o");
ukiEngine.deleteUniqueKey(t, new TestIndex("column0", "column1"), Arrays.asList((Comparable) Integer.valueOf(0), "oo"));
ukiEngine.insertUniqueKey(t, new TestIndex("column0", "column1"), Arrays.asList((Comparable) Integer.valueOf(1), "o"), entity1);
}
});
最佳答案
xodus-query的任何功能都是Xodus-DNQ项目的辅助功能,xodus-query模块最终将移至Xodus-DNQ。请仔细查看Xodus-DNQ,因为它提供了架构定义,字段的索引,约束等。