private TransactionRepresentation Tx(int size) { ICollection <StorageCommand> commands = new List <StorageCommand>(); for (int i = 0; i < size; i++) { // The type of command doesn't matter here commands.Add(new Command.NodeCommand(new NodeRecord(i), (new NodeRecord(i)).initialize(true, i, false, i, NO_LABELS_FIELD.longValue()))); } PhysicalTransactionRepresentation tx = new PhysicalTransactionRepresentation(commands); tx.SetHeader(new sbyte[0], 0, 0, 0, 0, 0, 0); return(tx); }
private NodeRecord GetNode(int nodeId, bool inUse) { NodeRecord nodeRecord = new NodeRecord(nodeId); nodeRecord = nodeRecord.Initialize(inUse, NO_NEXT_PROPERTY.longValue(), false, NO_NEXT_RELATIONSHIP.longValue(), NO_LABELS_FIELD.longValue()); if (inUse) { InlineNodeLabels labelFieldWriter = new InlineNodeLabels(nodeRecord); labelFieldWriter.Put(new long[] { ENTITY_TOKEN }, null, null); } return(nodeRecord); }