public virtual void PropertyKey(int id, string key, params int[] dynamicIds) { PropertyKeyTokenRecord before = new PropertyKeyTokenRecord(id); PropertyKeyTokenRecord after = WithName(new PropertyKeyTokenRecord(id), dynamicIds, key); _otherCommands.Add(new Command.PropertyKeyTokenCommand(before, after)); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private org.neo4j.kernel.impl.store.record.PropertyKeyTokenRecord readPropertyKeyTokenRecord(int id, org.neo4j.storageengine.api.ReadableChannel channel) throws java.io.IOException private PropertyKeyTokenRecord ReadPropertyKeyTokenRecord(int id, ReadableChannel channel) { // in_use(byte)+count(int)+key_blockId(int) sbyte inUseFlag = channel.Get(); bool inUse = false; if ((inUseFlag & Record.IN_USE.byteValue()) == Record.IN_USE.byteValue()) { inUse = true; } else if (inUseFlag != Record.NOT_IN_USE.byteValue()) { throw new IOException("Illegal in use flag: " + inUseFlag); } PropertyKeyTokenRecord record = new PropertyKeyTokenRecord(id); record.InUse = inUse; record.PropertyCount = channel.Int; record.NameId = channel.Int; if (ReadDynamicRecords(channel, record, PROPERTY_INDEX_DYNAMIC_RECORD_ADDER) == -1) { return(null); } return(record); }
public static PropertyKeyTokenCommand CreatePropertyKeyToken(int id, int nameId) { PropertyKeyTokenRecord before = new PropertyKeyTokenRecord(id); PropertyKeyTokenRecord after = new PropertyKeyTokenRecord(id); PopulateTokenRecord(after, nameId); return(new PropertyKeyTokenCommand(before, after)); }
private PropertyKeyTokenRecord CreatePropertyKeyTokenRecord(int id) { PropertyKeyTokenRecord propertyKeyTokenRecord = new PropertyKeyTokenRecord(id); propertyKeyTokenRecord.InUse = true; propertyKeyTokenRecord.NameId = 333; propertyKeyTokenRecord.AddNameRecord(new DynamicRecord(43)); return(propertyKeyTokenRecord); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private Command visitPropertyKeyTokenCommand(org.neo4j.storageengine.api.ReadableChannel channel) throws java.io.IOException private Command VisitPropertyKeyTokenCommand(ReadableChannel channel) { int id = channel.Int; PropertyKeyTokenRecord before = ReadPropertyKeyTokenRecord(id, channel); if (before == null) { return(null); } PropertyKeyTokenRecord after = ReadPropertyKeyTokenRecord(id, channel); if (after == null) { return(null); } return(new Command.PropertyKeyTokenCommand(before, after)); }
private GraphDatabaseAPI DatabaseWithManyPropertyKeys(int propertyKeyCount) { PageCache pageCache = _pageCacheRule.getPageCache(_fileSystemRule.get()); StoreFactory storeFactory = new StoreFactory(_testDirectory.databaseLayout(), Config.defaults(), new DefaultIdGeneratorFactory(_fileSystemRule.get()), pageCache, _fileSystemRule.get(), NullLogProvider.Instance, EmptyVersionContextSupplier.EMPTY); NeoStores neoStores = storeFactory.OpenAllNeoStores(true); PropertyKeyTokenStore store = neoStores.PropertyKeyTokenStore; for (int i = 0; i < propertyKeyCount; i++) { PropertyKeyTokenRecord record = new PropertyKeyTokenRecord(( int )store.nextId()); record.InUse = true; ICollection <DynamicRecord> nameRecords = store.AllocateNameRecords(PropertyStore.encodeString(Key(i))); record.AddNameRecords(nameRecords); record.NameId = ( int )Iterables.first(nameRecords).Id; store.UpdateRecord(record); } neoStores.Close(); return(Database()); }
protected internal abstract void CheckPropertyKeyToken(RecordStore <PropertyKeyTokenRecord> store, PropertyKeyTokenRecord record, RecordCheck <PropertyKeyTokenRecord, ConsistencyReport_PropertyKeyTokenConsistencyReport> checker);
public override void ProcessPropertyKeyToken(RecordStore <PropertyKeyTokenRecord> store, PropertyKeyTokenRecord record) { CheckPropertyKeyToken(store, record, _propertyKeyTokenChecker); }
public override void ForPropertyKey(PropertyKeyTokenRecord key, RecordCheck <PropertyKeyTokenRecord, ConsistencyReport_PropertyKeyTokenConsistencyReport> checker) { Dispatch(RecordType.PROPERTY_KEY, _propertyKeyReport, key, checker); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public abstract void processPropertyKeyToken(RecordStore<org.neo4j.kernel.impl.store.record.PropertyKeyTokenRecord> store, org.neo4j.kernel.impl.store.record.PropertyKeyTokenRecord record) throws FAILURE; public abstract void ProcessPropertyKeyToken(RecordStore <PropertyKeyTokenRecord> store, PropertyKeyTokenRecord record);
protected internal override void CheckPropertyKeyToken(RecordStore <PropertyKeyTokenRecord> store, PropertyKeyTokenRecord key, RecordCheck <PropertyKeyTokenRecord, Org.Neo4j.Consistency.report.ConsistencyReport_PropertyKeyTokenConsistencyReport> checker) { _report.forPropertyKey(key, checker); }
public override void check(PropertyKeyTokenRecord record, CheckerEngine <PropertyKeyTokenRecord, ConsistencyReport_PropertyKeyTokenConsistencyReport> engine, RecordAccess records) { }
public virtual void Add(PropertyKeyTokenRecord before, PropertyKeyTokenRecord after) { _otherCommands.Add(new Command.PropertyKeyTokenCommand(before, after)); }
public virtual void Update(PropertyKeyTokenRecord before, PropertyKeyTokenRecord after) { after.InUse = true; Add(before, after); }
public virtual void Create(PropertyKeyTokenRecord token) { token.SetCreated(); Update(new PropertyKeyTokenRecord(token.IntId), token); }