-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
- Loading branch information
1 parent
d325cc1
commit 1c4d590
Showing
1 changed file
with
62 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,68 @@ | ||
[ | ||
{ | ||
"comment": "Add your test case here for debugging and run go test -run=One.", | ||
"query": "", | ||
"comment": "delete from reference table - query send to source table", | ||
"query": "delete from user.ref_with_source where col = 1", | ||
"plan": { | ||
|
||
"QueryType": "DELETE", | ||
"Original": "delete from user.ref_with_source where col = 1", | ||
"Instructions": { | ||
"OperatorType": "Delete", | ||
"Variant": "Unsharded", | ||
"Keyspace": { | ||
"Name": "main", | ||
"Sharded": false | ||
}, | ||
"TargetTabletType": "PRIMARY", | ||
"Query": "delete from source_of_ref where col = 1", | ||
"Table": "source_of_ref" | ||
}, | ||
"TablesUsed": [ | ||
"main.source_of_ref" | ||
] | ||
} | ||
}, | ||
{ | ||
"comment": "update from reference table - query send to source table", | ||
"query": "update user.ref_with_source set x = 4 where col = 1", | ||
"plan": { | ||
"QueryType": "UPDATE", | ||
"Original": "update user.ref_with_source set x = 4 where col = 1", | ||
"Instructions": { | ||
"OperatorType": "Update", | ||
"Variant": "Unsharded", | ||
"Keyspace": { | ||
"Name": "main", | ||
"Sharded": false | ||
}, | ||
"TargetTabletType": "PRIMARY", | ||
"Query": "update source_of_ref set x = 4 where col = 1", | ||
"Table": "source_of_ref" | ||
}, | ||
"TablesUsed": [ | ||
"main.source_of_ref" | ||
] | ||
} | ||
}, | ||
{ | ||
"comment": "insert from reference table - query send to source table", | ||
"query": "insert into user.ref_with_source(x) values(4)", | ||
"plan": { | ||
"QueryType": "INSERT", | ||
"Original": "insert into user.ref_with_source(x) values(4)", | ||
"Instructions": { | ||
"OperatorType": "Insert", | ||
"Variant": "Unsharded", | ||
"Keyspace": { | ||
"Name": "main", | ||
"Sharded": false | ||
}, | ||
"TargetTabletType": "PRIMARY", | ||
"Query": "insert into source_of_ref(x) values (4)", | ||
"TableName": "source_of_ref" | ||
}, | ||
"TablesUsed": [ | ||
"main.source_of_ref" | ||
] | ||
} | ||
} | ||
] |