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

Function onInsert

packages/sql/mssql/src/MssqlClient.ts:690–698  ·  view source on GitHub ↗
(columns, placeholders, values, returning)

Source from the content-addressed store, hash-verified

688 }
689 },
690 onInsert(columns, placeholders, values, returning) {
691 const returningSql = returning ? returning[0] === "*" ? " OUTPUT INSERTED.*" : ` OUTPUT ${returning[0]}` : ""
692 return [
693 `(${columns.join(",")})${returningSql} VALUES ${placeholders}`,
694 returning ?
695 returning[1].concat(values.flat()) :
696 values.flat()
697 ]
698 }
699 })
700
701// compiler helpers

Callers

nothing calls this directly

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected