Skip to content
Snippets Groups Projects
Commit 1ae73f5a authored by Harpo Roeder's avatar Harpo Roeder
Browse files

add fields needed for indexing to delete

parent 0dea2faf
No related branches found
No related tags found
1 merge request!2Query Index Changes
......@@ -142,14 +142,20 @@ class ProcessHandle constructor(
fun delete(process: Process, logicalClock: Long): Pointer? {
val ev = Store.instance.getSignedEvent(system, process, logicalClock) ?: return null
var content= Protocol.Delete.newBuilder()
.setProcess(process.toProto())
.setLogicalClock(logicalClock)
.setIndices(ev.event.indices)
.setContentType(ev.event.contentType);
if (ev.event.unixMilliseconds != null) {
content.setUnixMilliseconds(ev.event.unixMilliseconds);
}
return publish(
ContentType.DELETE.value,
Protocol.Delete.newBuilder()
.setProcess(process.toProto())
.setLogicalClock(logicalClock)
.setIndices(ev.event.indices)
.build()
.toByteArray(),
content.build().toByteArray(),
null,
null,
mutableListOf()
......@@ -294,4 +300,4 @@ class ProcessHandle constructor(
return ProcessHandle(processSecret, processSecret.system.publicKey)
}
}
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment