MCPcopy Create free account
hub / github.com/Effect-TS/effect / onRecordUpdate

Function onRecordUpdate

packages/sql/mssql/src/MssqlClient.ts:674–682  ·  view source on GitHub ↗
(placeholders, valueAlias, valueColumns, values, returning)

Source from the content-addressed store, hash-verified

672 } :
673 escape,
674 onRecordUpdate(placeholders, valueAlias, valueColumns, values, returning) {
675 const returningSql = returning ? returning[0] === "*" ? "OUTPUT INSERTED.* " : `OUTPUT ${returning[0]} ` : ""
676 return [
677 `${returningSql}FROM (values ${placeholders}) AS ${valueAlias}${valueColumns}`,
678 returning ?
679 returning[1].concat(values.flat()) :
680 values.flat()
681 ]
682 },
683 onCustom(type, placeholder) {
684 switch (type.kind) {
685 case "MssqlParam": {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected