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

Function rowsToObjects

packages/sql-mssql/src/MssqlClient.ts:548–562  ·  view source on GitHub ↗
(rows: ReadonlyArray<any>)

Source from the content-addressed store, hash-verified

546const isMssqlParam = Statement.isCustom<MssqlParam>("MssqlParam")
547
548function rowsToObjects(rows: ReadonlyArray<any>) {
549 const newRows = new Array(rows.length)
550
551 for (let i = 0, len = rows.length; i < len; i++) {
552 const row = rows[i]
553 const newRow: any = {}
554 for (let j = 0, columnLen = row.length; j < columnLen; j++) {
555 const column = row[j]
556 newRow[column.metadata.colName] = column.value
557 }
558 newRows[i] = newRow
559 }
560
561 return newRows
562}

Callers 2

runFunction · 0.85
runProcedureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected