(operation: string)
| 99 | * Maps TanstackDB operations to {@link DiffTriggerOperation} |
| 100 | */ |
| 101 | export function mapOperationToPowerSync(operation: string) { |
| 102 | switch (operation) { |
| 103 | case `insert`: |
| 104 | return DiffTriggerOperation.INSERT |
| 105 | case `update`: |
| 106 | return DiffTriggerOperation.UPDATE |
| 107 | case `delete`: |
| 108 | return DiffTriggerOperation.DELETE |
| 109 | default: |
| 110 | throw new Error(`Unknown operation ${operation} received`) |
| 111 | } |
| 112 | } |
no outgoing calls
no test coverage detected