public TransactionCountingStateVisitor(TxStateVisitor next, StorageReader storageReader, ReadableTransactionState txState, CountsRecordState counts) : base(next) { this._storageReader = storageReader; this._txState = txState; this._counts = counts; this._nodeCursor = storageReader.AllocateNodeCursor(); this._groupCursor = storageReader.AllocateRelationshipGroupCursor(); }
public override TxStateVisitor DecorateTxStateVisitor(StorageReader storageReader, Read read, CursorFactory cursorFactory, ReadableTransactionState state, TxStateVisitor visitor) { return(visitor); }
public abstract TxStateVisitor DecorateTxStateVisitor(StorageReader storageReader, Read read, CursorFactory cursorFactory, ReadableTransactionState state, TxStateVisitor visitor);
public override TxStateVisitor DecorateTxStateVisitor(StorageReader storageReader, Read read, CursorFactory cursorFactory, ReadableTransactionState txState, TxStateVisitor visitor) { if (!txState.HasDataChanges()) { // If there are no data changes, there is no need to enforce constraints. Since there is no need to // enforce constraints, there is no need to build up the state required to be able to enforce constraints. // In fact, it might even be counter productive to build up that state, since if there are no data changes // there would be schema changes instead, and in that case we would throw away the schema-dependant state // we just built when the schema changing transaction commits. return(visitor); } return(getOrCreatePropertyExistenceEnforcerFrom(storageReader).decorate(visitor, read, cursorFactory)); }