MCPcopy
hub / github.com/aspen-cloud/triplit / disconnectQuery

Method disconnectQuery

packages/client/src/sync-engine.ts:768–777  ·  view source on GitHub ↗

* @hidden

(id: string)

Source from the content-addressed store, hash-verified

766 * @hidden
767 */
768 disconnectQuery(id: string) {
769 if (!this.queries.has(id)) return;
770 const queryMetadata = this.queries.get(id)!;
771 if (queryMetadata.hasSent) {
772 this.sendMessage({ type: 'DISCONNECT_QUERY', payload: { id } });
773 } else {
774 queryMetadata.abortController.abort();
775 }
776 this.queries.delete(id);
777 }
778
779 /**
780 * A hash of the last set of connected params, should not reconnect if the same params are used twice and the connection is already open

Callers 2

subscribeMethod · 0.95
handleErrorMessageMethod · 0.95

Calls 4

sendMessageMethod · 0.95
hasMethod · 0.80
getMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected