Skip to content

Commit cd13a4f

Browse files
committed
add state capture to query aggregator
1 parent ea6ef85 commit cd13a4f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

samples/javascript/state-tracking-example.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ async function trackStatementStates () {
7676
queryStream.on('error', reject)
7777
})
7878

79+
const res = await connection.promises.query(query)
80+
console.log(`${JSON.stringify(res.states, null, 2)}`)
7981
// Example with prepared statement to see different state transitions
8082
console.log('\n--- Prepared Statement Example ---')
8183
const ps = await connection.promises.prepare('select len(convert(varchar, ?)) as len')

0 commit comments

Comments
 (0)