MCPcopy Create free account
hub / github.com/TanStack/db / mapOperation

Function mapOperation

packages/powersync-db-collection/src/helpers.ts:87–96  ·  view source on GitHub ↗
(operation: DiffTriggerOperation)

Source from the content-addressed store, hash-verified

85 * Maps {@link DiffTriggerOperation} to TanstackDB operations
86 */
87export function mapOperation(operation: DiffTriggerOperation) {
88 switch (operation) {
89 case DiffTriggerOperation.INSERT:
90 return `insert`
91 case DiffTriggerOperation.UPDATE:
92 return `update`
93 case DiffTriggerOperation.DELETE:
94 return `delete`
95 }
96}
97
98/**
99 * Maps TanstackDB operations to {@link DiffTriggerOperation}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected