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

Function connectClient

packages/pg-native/test/many-connections.js:12–30  ·  view source on GitHub ↗
(n, cb)

Source from the content-addressed store, hash-verified

10 this.timeout(200000)
11
12 const connectClient = function (n, cb) {
13 const client = new Client()
14 client.connect(
15 ok(cb, function () {
16 bytes(
17 1000,
18 ok(cb, function (chunk) {
19 client.query(
20 'SELECT $1::text as txt',
21 [chunk.toString('base64')],
22 ok(cb, function (rows) {
23 client.end(cb)
24 })
25 )
26 })
27 )
28 })
29 )
30 }
31
32 const run = function (n, cb) {
33 async.times(count, connectClient, cb)

Callers

nothing calls this directly

Calls 3

connectMethod · 0.95
queryMethod · 0.95
endMethod · 0.95

Tested by

no test coverage detected