@@ -1989,9 +1989,9 @@ t('subscribe', { timeout: 2 }, async() => {
1989
1989
1990
1990
const result = [ ]
1991
1991
1992
- const { unsubscribe } = await sql . subscribe ( '*' , ( row , { command, old } ) =>
1993
- result . push ( command , row . name || row . id , old && old . name )
1994
- )
1992
+ const { unsubscribe } = await sql . subscribe ( '*' , ( row , { command, old } ) => {
1993
+ result . push ( command , row . name , row . id , old && old . name , old && old . id )
1994
+ } )
1995
1995
1996
1996
await sql `
1997
1997
create table test (
@@ -2003,6 +2003,7 @@ t('subscribe', { timeout: 2 }, async() => {
2003
2003
await sql `alter table test replica identity default`
2004
2004
await sql `insert into test (name) values ('Murray')`
2005
2005
await sql `update test set name = 'Rothbard'`
2006
+ await sql `update test set id = 2`
2006
2007
await sql `delete from test`
2007
2008
await sql `alter table test replica identity full`
2008
2009
await sql `insert into test (name) values ('Murray')`
@@ -2013,7 +2014,7 @@ t('subscribe', { timeout: 2 }, async() => {
2013
2014
await sql `insert into test (name) values ('Oh noes')`
2014
2015
await delay ( 10 )
2015
2016
return [
2016
- 'insert,Murray,, update,Rothbard,,delete,1,, insert,Murray,, update,Rothbard,Murray,delete,Rothbard,' ,
2017
+ 'insert,Murray,1,,, update,Rothbard,1,,,update,Rothbard,2,,1,delete,,2,,, insert,Murray,2,,, update,Rothbard,2, Murray,2, delete,Rothbard,2, ,' ,
2017
2018
result . join ( ',' ) ,
2018
2019
await sql `drop table test` ,
2019
2020
await sql `drop publication alltables` ,
0 commit comments