File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -174,6 +174,13 @@ function Backend({
174174 }
175175
176176 function RowDescription ( x ) {
177+ if ( backend . query . result . command ) {
178+ backend . query . results = backend . query . results || [ backend . query . result ]
179+ backend . query . results . push ( backend . query . result = [ ] )
180+ backend . query . result . count = null
181+ backend . query . statement . columns = null
182+ }
183+
177184 rows = 0
178185
179186 if ( backend . query . statement . columns )
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ function Connection(options = {}) {
131131 ? ( backend . query ? backend . query . reject ( err ) : error ( err ) )
132132 : ( backend . query && backend . query . resolve ( backend . query . stream
133133 ? backend . query . result . count
134- : backend . query . result ) )
134+ : ( backend . query . results || backend . query . result ) ) )
135135
136136 backend . query = backend . error = null
137137 timeout && queries . length === 0 && idle ( )
Original file line number Diff line number Diff line change @@ -681,8 +681,8 @@ t('Multiple queries', async() => {
681681t ( 'Multiple statements' , async ( ) =>
682682 [ 2 , await sql . unsafe ( `
683683 select 1 as x;
684- select 2 as x ;
685- ` ) . then ( ( [ , x ] ) => x . x ) ]
684+ select 2 as a ;
685+ ` ) . then ( ( [ , [ x ] ] ) => x . a ) ]
686686)
687687
688688t ( 'throws correct error when authentication fails' , async ( ) => {
You can’t perform that action at this time.
0 commit comments