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

Function write

cjs/src/connection.js:246–252  ·  view source on GitHub ↗
(x, fn)

Source from the content-addressed store, hash-verified

244 }
245
246 function write(x, fn) {
247 chunk = chunk ? Buffer.concat([chunk, x]) : Buffer.from(x)
248 if (fn || chunk.length >= 1024)
249 return nextWrite(fn)
250 nextWriteTimer === null && (nextWriteTimer = setImmediate(nextWrite))
251 return true
252 }
253
254 function nextWrite(fn) {
255 const x = socket.write(chunk, fn)

Callers 14

executeFunction · 0.70
secureFunction · 0.70
dataFunction · 0.70
connectedFunction · 0.70
CommandCompleteFunction · 0.70
ParameterDescriptionFunction · 0.70
RowDescriptionFunction · 0.70
SASLFunction · 0.70
SASLContinueFunction · 0.70
NoDataFunction · 0.70

Calls 5

nextWriteFunction · 0.70
writeMethod · 0.65
endMethod · 0.65
rawMethod · 0.65
setImmediateFunction · 0.50

Tested by

no test coverage detected