Skip to content

Commit

Permalink
Update testdata
Browse files Browse the repository at this point in the history
  • Loading branch information
apstndb committed Jan 9, 2025
1 parent 61122d4 commit 042b239
Show file tree
Hide file tree
Showing 28 changed files with 1,980 additions and 3,554 deletions.
6 changes: 6 additions & 0 deletions testdata/input/dml/nested_update_delete_update_insert.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
UPDATE Singers s
SET
(DELETE FROM s.SingerInfo.Residence r WHERE r.City = 'Seattle'),
(UPDATE s.Albums.Song song SET song.songtitle = 'No, This Is Rubbish' WHERE song.songtitle = 'This Is Pretty Good'),
(INSERT s.Albums.Song VALUES ("songtitle: 'The Second Best Song'"))
WHERE SingerId = 3 AND s.Albums.title = 'Go! Go! Go!'
4 changes: 4 additions & 0 deletions testdata/input/dml/nested_update_insert_song.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
UPDATE Singers s
SET (INSERT s.AlbumInfo.Song(Song)
VALUES ("songtitle: 'Bonus Track', length: 180"))
WHERE s.SingerId = 5 AND s.AlbumInfo.title = "Fire is Hot"
5 changes: 5 additions & 0 deletions testdata/input/dml/nested_update_insert_song_path.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
UPDATE Singers s
SET (INSERT s.AlbumInfo.Song
VALUES ('''songtitle: 'Bonus Track', length:180''')),
s.Albums.tracks = 16
WHERE s.SingerId = 5 and s.AlbumInfo.title = "Fire is Hot"
4 changes: 4 additions & 0 deletions testdata/input/dml/nested_update_insert_string.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
UPDATE Singers s
SET (INSERT s.AlbumInfo.comments
VALUES ("Groovy!"))
WHERE s.SingerId = 5 AND s.AlbumInfo.title = "Fire is Hot"
6 changes: 6 additions & 0 deletions testdata/input/dml/nested_update_update_nested_insert.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
UPDATE Singers s
SET (UPDATE s.AlbumInfo.Song so
SET (INSERT INTO so.Chart
VALUES ("chartname: 'Galaxy Top 100', rank: 5"))
WHERE so.songtitle = "Bonus Track")
WHERE s.SingerId = 5
7 changes: 7 additions & 0 deletions testdata/input/dml/nested_update_update_nested_update.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
UPDATE Singers s
SET (UPDATE s.AlbumInfo.Song so
SET (UPDATE so.Chart c
SET c.rank = 2
WHERE c.chartname = "Galaxy Top 100")
WHERE so.songtitle = "Bonus Track")
WHERE s.SingerId = 5
Loading

0 comments on commit 042b239

Please sign in to comment.