MCPcopy Create free account
hub / github.com/porsager/postgres / connected

Function connected

cf/src/connection.js:367–381  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

365 }
366
367 function connected() {
368 try {
369 statements = {}
370 needsTypes = options.fetch_types
371 statementId = Math.random().toString(36).slice(2)
372 statementCount = 1
373 lifeTimer.start()
374 socket.on('data', data)
375 keep_alive && socket.setKeepAlive && socket.setKeepAlive(true, 1000 * keep_alive)
376 const s = StartupMessage()
377 write(s)
378 } catch (err) {
379 error(err)
380 }
381 }
382
383 function error(err) {
384 if (connection.queue === queues.connecting && options.host[retries + 1])

Callers 2

secureFunction · 0.70
connectFunction · 0.70

Calls 3

StartupMessageFunction · 0.70
writeFunction · 0.70
errorFunction · 0.70

Tested by

no test coverage detected