MCPcopy Index your code
hub / github.com/subquery/subql / put

Method put

packages/node-core/src/indexer/StoreOperations.ts:57–70  ·  view source on GitHub ↗
(operation: OperationType, entity: string, data: Entity | string)

Source from the content-addressed store, hash-verified

55 }
56
57 put(operation: OperationType, entity: string, data: Entity | string): void {
58 const operationEntity: OperationEntity = {
59 operation: operation,
60 entityType: entity,
61 data: data,
62 };
63 // skip full data, should write in higher level
64 monitorWrite(
65 `-- [POI][StoreOperations][put] ${operation} entity ${entity}, data/id: ${
66 typeof data === 'string' ? data : data.id
67 }`
68 );
69 this.merkleTools.addLeaf(u8aToBuffer(this.operationEntityToUint8Array(operationEntity)), true);
70 }
71
72 reset(): void {
73 // Bad types

Callers 11

syncedPoiQueueAppendMethod · 0.45
setMethod · 0.45
bulkCreateMethod · 0.45
bulkUpdateMethod · 0.45
bulkRemoveMethod · 0.45
fetchBlockFunction · 0.45
pipeBlockFunction · 0.45
fetchBlocksFromQueueMethod · 0.45
enqueueBlockMethod · 0.45

Calls 2

monitorWriteFunction · 0.90

Tested by

no test coverage detected