use of org.neo4j.kernel.impl.api.state.TxState in project neo4j by neo4j.
the class RecordStorageReaderTestBase method createUniquenessConstraint.
protected IndexDescriptor createUniquenessConstraint(Label label, String propertyKey) throws Exception {
IndexDescriptor index = createUniqueIndex(label, propertyKey);
TxState txState = new TxState();
int labelId = getOrCreateLabelId(label);
int propertyKeyId = getOrCreatePropertyKeyId(propertyKey);
UniquenessConstraintDescriptor constraint = ConstraintDescriptorFactory.uniqueForLabel(labelId, propertyKeyId);
constraint = constraint.withName(index.getName()).withOwnedIndexId(index.getId());
txState.constraintDoAdd(constraint);
apply(txState);
return index;
}
use of org.neo4j.kernel.impl.api.state.TxState in project neo4j by neo4j.
the class RecordStorageReaderTestBase method deleteNode.
protected void deleteNode(long nodeId) throws Exception {
TxState txState = new TxState();
txState.nodeDoDelete(nodeId);
apply(txState);
}
Aggregations