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

Function update

cf/src/types.js:165–170  ·  view source on GitHub ↗
(first, rest, parameters, types, options)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

escapeIdentifierFunction · 0.70
stringifyValueFunction · 0.70

Tested by

no test coverage detected