File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,8 @@ export class Query extends Promise {
108
108
}
109
109
110
110
describe ( ) {
111
- this . onlyDescribe = true
111
+ this . options . simple = false
112
+ this . onlyDescribe = this . options . prepare = true
112
113
return this
113
114
}
114
115
Original file line number Diff line number Diff line change @@ -616,6 +616,18 @@ t('unsafe simple includes columns', async() => {
616
616
return [ 'x' , ( await sql . unsafe ( 'select 1 as x' ) . values ( ) ) . columns [ 0 ] . name ]
617
617
} )
618
618
619
+ t ( 'unsafe describe' , async ( ) => {
620
+ const q = 'insert into test values (1)'
621
+ await sql `create table test(a int unique)`
622
+ await sql . unsafe ( q ) . describe ( )
623
+ const x = await sql . unsafe ( q ) . describe ( )
624
+ return [
625
+ q ,
626
+ x . string ,
627
+ await sql `drop table test`
628
+ ]
629
+ } )
630
+
619
631
t ( 'listen and notify' , async ( ) => {
620
632
const sql = postgres ( options )
621
633
const channel = 'hello'
You can’t perform that action at this time.
0 commit comments