feat: add support for filter during merge insert when matched (#948)

Closes #940
This commit is contained in:
Weston Pace
2024-02-09 10:26:14 -08:00
parent 069ad267bd
commit 41ccb48160
12 changed files with 150 additions and 51 deletions

View File

@@ -286,8 +286,11 @@ export class RemoteTable<T = number[]> implements Table<T> {
const queryParams: any = {
on
}
if (args.whenMatchedUpdateAll ?? false) {
if (args.whenMatchedUpdateAll !== false && args.whenMatchedUpdateAll !== null && args.whenMatchedUpdateAll !== undefined) {
queryParams.when_matched_update_all = 'true'
if (typeof args.whenMatchedUpdateAll === 'string') {
queryParams.when_matched_update_all_filt = args.whenMatchedUpdateAll
}
} else {
queryParams.when_matched_update_all = 'false'
}