Search in sources :

Example 6 with AddNodeCommand

use of org.neo4j.kernel.impl.index.IndexCommand.AddNodeCommand in project neo4j by neo4j.

the class LegacyIndexTransactionStateImpl method addNode.

@Override
public void addNode(String indexName, long id, String key, Object value) {
    AddNodeCommand command = new AddNodeCommand();
    command.init(definitions().getOrAssignIndexNameId(indexName), id, definitions().getOrAssignKeyId(key), value);
    addCommand(indexName, command);
}
Also used : AddNodeCommand(org.neo4j.kernel.impl.index.IndexCommand.AddNodeCommand)

Example 7 with AddNodeCommand

use of org.neo4j.kernel.impl.index.IndexCommand.AddNodeCommand in project neo4j by neo4j.

the class PhysicalLogCommandReaderV3_0 method visitIndexAddNodeCommand.

private Command visitIndexAddNodeCommand(ReadableChannel channel) throws IOException {
    IndexCommandHeader header = readIndexCommandHeader(channel);
    Number entityId = header.entityIdNeedsLong ? channel.getLong() : channel.getInt();
    Object value = readIndexValue(header.valueType, channel);
    AddNodeCommand command = new AddNodeCommand();
    command.init(header.indexNameId, entityId.longValue(), header.keyId, value);
    return command;
}
Also used : AddNodeCommand(org.neo4j.kernel.impl.index.IndexCommand.AddNodeCommand)

Example 8 with AddNodeCommand

use of org.neo4j.kernel.impl.index.IndexCommand.AddNodeCommand in project neo4j by neo4j.

the class LuceneCommandApplierTest method addNodeToIndex.

private static AddNodeCommand addNodeToIndex(IndexDefineCommand definitions, String indexName, long nodeId) {
    AddNodeCommand command = new AddNodeCommand();
    command.init(definitions.getOrAssignIndexNameId(indexName), nodeId, (byte) 0, "some value");
    return command;
}
Also used : AddNodeCommand(org.neo4j.kernel.impl.index.IndexCommand.AddNodeCommand)

Aggregations

AddNodeCommand (org.neo4j.kernel.impl.index.IndexCommand.AddNodeCommand)8