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

Function update

cjs/src/types.js:164–169  ·  view source on GitHub ↗
(first, rest, parameters, types, options)

Source from the content-addressed store, hash-verified

162 '\\(': select,
163
164 update(first, rest, parameters, types, options) {
165 return (rest.length ? rest.flat() : Object.keys(first)).map(x =>
166 escapeIdentifier(options.transform.column.to ? options.transform.column.to(x) : x) +
167 '=' + stringifyValue('values', first[x], parameters, types, options)
168 )
169 },
170
171 insert(first, rest, parameters, types, options) {
172 const columns = rest.length ? rest.flat() : Object.keys(Array.isArray(first) ? first[0] : first)

Callers

nothing calls this directly

Calls 2

stringifyValueFunction · 0.70
escapeIdentifierFunction · 0.50

Tested by

no test coverage detected