MCPcopy Index your code
hub / github.com/DeepNotesApp/DeepNotes / mhgetCoalesce

Method mhgetCoalesce

apps/client/src/code/realtime/client.ts:88–112  ·  view source on GitHub ↗
(
        items: [DataPrefix, string, string][],
        params?: { subscribe?: boolean; ctx?: RealtimeContext },
      )

Source from the content-addressed store, hash-verified

86 // Get commands
87
88 async mhgetCoalesce(
89 items: [DataPrefix, string, string][],
90 params?: { subscribe?: boolean; ctx?: RealtimeContext },
91 ) {
92 if (params?.subscribe) {
93 return await (params.ctx ?? this.globalCtx).mhgetCoalesceAsync(items);
94 } else {
95 internals.realtime.markAsDependencies(
96 items.map((item) => getFullKey(...item)),
97 );
98
99 for (const item of items) {
100 const value = await this.hget(
101 item[0] as any,
102 item[1],
103 item[2],
104 params,
105 );
106
107 if (value != null) {
108 return value;
109 }
110 }
111 }
112 }
113 async mhget(
114 items: [DataPrefix, string, string][],
115 params?: { subscribe?: boolean; ctx?: RealtimeContext },

Callers

nothing calls this directly

Calls 4

getFullKeyFunction · 0.90
mhgetCoalesceAsyncMethod · 0.80
markAsDependenciesMethod · 0.80
hgetMethod · 0.45

Tested by

no test coverage detected