@@ -20,7 +20,7 @@ describe("playground demo: cap-rooted API over exoeval RPC", () => {
2020 const user = await api . currentUser ( ) ;
2121 return user . orders ( )
2222 . select ( ( { orders } ) => ( { id : orders . id , org : orders . organization_id } ) )
23- . execute ( api . db ) ;
23+ . execute ( api . conn ) ;
2424 } ) ;
2525 expect ( alice . length ) . toBeGreaterThan ( 0 ) ;
2626 expect ( new Set ( alice . map ( ( r ) => r . org ) ) ) . toEqual ( new Set ( [ "1" ] ) ) ;
@@ -30,7 +30,7 @@ describe("playground demo: cap-rooted API over exoeval RPC", () => {
3030 const user = await api . currentUser ( ) ;
3131 return user . orders ( )
3232 . select ( ( { orders } ) => ( { id : orders . id , org : orders . organization_id } ) )
33- . execute ( api . db ) ;
33+ . execute ( api . conn ) ;
3434 } ) ;
3535 expect ( dave . length ) . toBeGreaterThan ( 0 ) ;
3636 expect ( new Set ( dave . map ( ( r ) => r . org ) ) ) . toEqual ( new Set ( [ "2" ] ) ) ;
@@ -42,7 +42,7 @@ describe("playground demo: cap-rooted API over exoeval RPC", () => {
4242 return user . orders ( )
4343 . where ( ( { orders } ) => orders . status . in ( "packed" , "shipped" ) )
4444 . select ( ( { orders } ) => ( { id : orders . id , status : orders . status } ) )
45- . execute ( api . db ) ;
45+ . execute ( api . conn ) ;
4646 } ) ;
4747 for ( const row of result ) {
4848 expect ( [ "packed" , "shipped" ] ) . toContain ( row . status ) ;
@@ -57,7 +57,7 @@ describe("playground demo: cap-rooted API over exoeval RPC", () => {
5757 id : orders . id ,
5858 customer : orders . customer ( ) . select ( ( { customers } ) => ( { name : customers . name } ) ) . scalar ( ) ,
5959 } ) )
60- . execute ( api . db ) ;
60+ . execute ( api . conn ) ;
6161 } ) ;
6262 expect ( result . length ) . toBeGreaterThan ( 0 ) ;
6363 for ( const row of result ) {
@@ -74,7 +74,7 @@ describe("playground demo: cap-rooted API over exoeval RPC", () => {
7474 status : orders . status ,
7575 count : orders . id . count ( ) ,
7676 } ) )
77- . execute ( api . db ) ;
77+ . execute ( api . conn ) ;
7878 } ) ;
7979 expect ( result . length ) . toBeGreaterThan ( 0 ) ;
8080 for ( const row of result ) {
@@ -90,7 +90,7 @@ describe("playground demo: cap-rooted API over exoeval RPC", () => {
9090 return user . orders ( )
9191 . where ( ( { orders } ) => orders . status [ "=" ] ( "draft" ) )
9292 . select ( ( { orders } ) => ( { id : orders . id } ) )
93- . live ( api . db ) ;
93+ . live ( api . conn ) ;
9494 } ) ;
9595 const it = ( iter as AsyncIterable < { id : string } [ ] > ) [ Symbol . asyncIterator ] ( ) ;
9696
@@ -104,7 +104,7 @@ describe("playground demo: cap-rooted API over exoeval RPC", () => {
104104 // iterator yields again with the new row included.
105105 const inserted = await rpc ( async ( api ) => {
106106 const user = await api . currentUser ( ) ;
107- return ( await user . insertDraftOrder ( api . db ) ) . id ;
107+ return ( await user . insertDraftOrder ( api . conn ) ) . id ;
108108 } ) ;
109109
110110 const second = await it . next ( ) ;
@@ -120,7 +120,7 @@ describe("playground demo: cap-rooted API over exoeval RPC", () => {
120120 const user = await api . currentUser ( ) ;
121121 return user . orders ( )
122122 . select ( ( { orders } ) => ( { id : orders . id , status : orders . status } ) )
123- . live ( api . db ) ;
123+ . live ( api . conn ) ;
124124 } ) ;
125125 const it = ( iter as AsyncIterable < { id : string ; status : string } [ ] > ) [ Symbol . asyncIterator ] ( ) ;
126126 const first = await it . next ( ) ;
@@ -135,7 +135,7 @@ describe("playground demo: cap-rooted API over exoeval RPC", () => {
135135 const user = await api . currentUser ( ) ;
136136 return user . orders ( )
137137 . select ( ( { orders } ) => ( { id : orders . id } ) )
138- . live ( api . db ) ;
138+ . live ( api . conn ) ;
139139 } ) ;
140140 const it = ( iter as AsyncIterable < { id : string } [ ] > ) [ Symbol . asyncIterator ] ( ) ;
141141
@@ -169,7 +169,7 @@ describe("playground demo: cap-rooted API over exoeval RPC", () => {
169169 return u . orders ( )
170170 . select ( ( { orders } ) => ( { id : orders . id } ) )
171171 . debug ( )
172- . execute ( api . db ) ;
172+ . execute ( api . conn ) ;
173173 } ) ;
174174 expect ( Array . isArray ( result ) ) . toBe ( true ) ;
175175 } finally {
0 commit comments