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

Function tsa

cf/src/index.js:504–510  ·  view source on GitHub ↗
(o, url, env)

Source from the content-addressed store, hash-verified

502}
503
504function tsa(o, url, env) {
505 const x = o.target_session_attrs || url.searchParams.get('target_session_attrs') || env.PGTARGETSESSIONATTRS
506 if (!x || ['read-write', 'read-only', 'primary', 'standby', 'prefer-standby'].includes(x))
507 return x
508
509 throw new Error('target_session_attrs ' + x + ' is not supported')
510}
511
512function backoff(retries) {
513 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