MCPcopy Index your code
hub / github.com/brianc/node-postgres / execute

Function execute

packages/pg-native/test/load.js:5–21  ·  view source on GitHub ↗
(x, done)

Source from the content-addressed store, hash-verified

3const ok = require('okay')
4
5const execute = function (x, done) {
6 const client = new Client()
7 client.connectSync()
8 const query = function (n, cb) {
9 client.query('SELECT $1::int as num', [n], function (err) {
10 cb(err)
11 })
12 }
13 return async.timesSeries(
14 5,
15 query,
16 ok(done, function () {
17 client.end()
18 done()
19 })
20 )
21}
22describe('Load tests', function () {
23 it('single client and many queries', function (done) {
24 async.times(1, execute, done)

Callers

nothing calls this directly

Calls 1

endMethod · 0.95

Tested by

no test coverage detected