@@ -1789,14 +1789,14 @@ t('Recreate prepared statements on RevalidateCachedQuery error', async() => {
1789
1789
]
1790
1790
} )
1791
1791
1792
- t ( 'Properly throws routing error on not prepared statements' , async ( ) => {
1792
+ t ( 'Properly throws routine error on not prepared statements' , async ( ) => {
1793
1793
await sql `create table x (x text[])`
1794
1794
const { routine } = await sql . unsafe ( `insert into x(x) values (('a', 'b'))` ) . catch ( e => e )
1795
1795
1796
1796
return [ 'transformAssignedExpr' , routine , await sql `drop table x` ]
1797
1797
} )
1798
1798
1799
- t ( 'Properly throws routing error on not prepared statements in transaction' , async ( ) => {
1799
+ t ( 'Properly throws routine error on not prepared statements in transaction' , async ( ) => {
1800
1800
const { routine } = await sql . begin ( sql => [
1801
1801
sql `create table x (x text[])` ,
1802
1802
sql `insert into x(x) values (('a', 'b'))` ,
@@ -1805,6 +1805,15 @@ t('Properly throws routing error on not prepared statements in transaction', asy
1805
1805
return [ 'transformAssignedExpr' , routine ]
1806
1806
} )
1807
1807
1808
+ t ( 'Properly throws routine error on not prepared statements using file' , async ( ) => {
1809
+ const { routine } = await sql . unsafe ( `
1810
+ create table x (x text[]);
1811
+ insert into x(x) values (('a', 'b'));
1812
+ ` , { prepare : true } ) . catch ( e => e )
1813
+
1814
+ return [ 'transformAssignedExpr' , routine ]
1815
+ } )
1816
+
1808
1817
t ( 'Catches connection config errors' , async ( ) => {
1809
1818
const sql = postgres ( { ...options , user : { toString : ( ) => { throw new Error ( 'wat' ) } } , database : 'prut' } )
1810
1819
0 commit comments