File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 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 {
108108 }
109109
110110 describe ( ) {
111- this . onlyDescribe = true
111+ this . options . simple = false
112+ this . onlyDescribe = this . options . prepare = true
112113 return this
113114 }
114115
Original file line number Diff line number Diff line change @@ -616,6 +616,18 @@ t('unsafe simple includes columns', async() => {
616616 return [ 'x' , ( await sql . unsafe ( 'select 1 as x' ) . values ( ) ) . columns [ 0 ] . name ]
617617} )
618618
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+
619631t ( 'listen and notify' , async ( ) => {
620632 const sql = postgres ( options )
621633 const channel = 'hello'
You can’t perform that action at this time.
0 commit comments