File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -1436,6 +1436,25 @@ public void testPostgreSQLReturningClause() {
1436
1436
parser
1437
1437
.parse (Statement .of ("insert into t1 select 1 as/*eomment*/returning returning *" ))
1438
1438
.hasReturningClause ());
1439
+ assertFalse (
1440
+ parser
1441
+ .parse (Statement .of ("UPDATE x SET y = $$ RETURNING a, b, c$$ WHERE z = 123" ))
1442
+ .hasReturningClause ());
1443
+ assertFalse (
1444
+ parser
1445
+ .parse (
1446
+ Statement .of ("UPDATE x SET y = $foobar$ RETURNING a, b, c$foobar$ WHERE z = 123" ))
1447
+ .hasReturningClause ());
1448
+ assertFalse (
1449
+ parser
1450
+ .parse (Statement .of ("UPDATE x SET y = $returning$ returning $returning$ WHERE z = 123" ))
1451
+ .hasReturningClause ());
1452
+ assertTrue (
1453
+ parser
1454
+ .parse (
1455
+ Statement .of (
1456
+ "UPDATE x SET y = $returning$returning$returning$ WHERE z = 123 ReTuRnInG *" ))
1457
+ .hasReturningClause ());
1439
1458
}
1440
1459
1441
1460
private void assertUnclosedLiteral (String sql ) {
You can’t perform that action at this time.
0 commit comments