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

Function tsa

cjs/src/index.js:503–509  ·  view source on GitHub ↗
(o, url, env)

Source from the content-addressed store, hash-verified

501}
502
503function tsa(o, url, env) {
504 const x = o.target_session_attrs || url.searchParams.get('target_session_attrs') || env.PGTARGETSESSIONATTRS
505 if (!x || ['read-write', 'read-only', 'primary', 'standby', 'prefer-standby'].includes(x))
506 return x
507
508 throw new Error('target_session_attrs ' + x + ' is not supported')
509}
510
511function backoff(retries) {
512 return (0.5 + Math.random() / 2) * Math.min(3 ** retries / 100, 20)

Callers 1

parseOptionsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected