MCPcopy Index your code
hub / github.com/Effect-TS/effect / rowsToObjects

Function rowsToObjects

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

Source from the content-addressed store, hash-verified

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

Callers 2

runFunction · 0.85
runProcedureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected