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

Function parseError

deno/src/connection.js:1013–1023  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

1011}
1012
1013function parseError(x) {
1014 const error = {}
1015 let start = 5
1016 for (let i = 5; i < x.length - 1; i++) {
1017 if (x[i] === 0) {
1018 error[errorFields[x[start]]] = x.toString('utf8', start + 1, i)
1019 start = i + 1
1020 }
1021 }
1022 return error
1023}
1024
1025function md5(x) {
1026 return crypto.createHash('md5').update(x).digest('hex')

Callers 2

ErrorResponseFunction · 0.70
NoticeResponseFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected