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

Function toBuffer

cjs/src/connection.js:185–198  ·  view source on GitHub ↗
(q)

Source from the content-addressed store, hash-verified

183 }
184
185 function toBuffer(q) {
186 if (q.parameters.length >= 65534)
187 throw Errors.generic('MAX_PARAMETERS_EXCEEDED', 'Max number of parameters (65534) exceeded')
188
189 return q.options.simple
190 ? b().Q().str(q.statement.string + b.N).end()
191 : q.describeFirst
192 ? Buffer.concat([describe(q), Flush])
193 : q.prepare
194 ? q.prepared
195 ? prepared(q)
196 : Buffer.concat([describe(q), prepared(q)])
197 : unnamed(q)
198 }
199
200 function describe(q) {
201 return Buffer.concat([

Callers 1

executeFunction · 0.70

Calls 4

describeFunction · 0.70
preparedFunction · 0.70
unnamedFunction · 0.70
endMethod · 0.65

Tested by

no test coverage detected