���Root Mod By V1rus_Alfa
User / IP
:
216.73.217.78
Host / Server
:
195.214.235.115 / npln.ir
System
:
Linux damavand.pws-dns.net 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Command
|
Upload
|
Mass Deface
|
Create
:
/
home2
/
cutunixc
/
.trash
/
node_modules.1
/
db0
/
integrations
/
drizzle
/
Viewing: _utils.mjs
import { getTableName, is, Column, SQL } from "drizzle-orm"; export function mapResultRow(columns, row, joinsNotNullableMap) { const nullifyMap = {}; const result = columns.reduce( (result2, { path, field }, columnIndex) => { let decoder; if (is(field, Column)) { decoder = field; } else if (is(field, SQL)) { decoder = "decoder" in field && field.decoder; } else { decoder = "decoder" in field.sql && field.sql.decoder; } let node = result2; for (const [pathChunkIndex, pathChunk] of path.entries()) { if (pathChunkIndex < path.length - 1) { if (!(pathChunk in node)) { node[pathChunk] = {}; } node = node[pathChunk]; } else { const rawValue = row[columnIndex]; const value = node[pathChunk] = rawValue === null ? null : decoder.mapFromDriverValue(rawValue); if (joinsNotNullableMap && is(field, Column) && path.length === 2) { const objectName = path[0]; if (!(objectName in nullifyMap)) { nullifyMap[objectName] = value === null ? getTableName(field.table) : false; } else if (typeof nullifyMap[objectName] === "string" && nullifyMap[objectName] !== getTableName(field.table)) { nullifyMap[objectName] = false; } } } } return result2; }, {} ); if (joinsNotNullableMap && Object.keys(nullifyMap).length > 0) { for (const [objectName, tableName] of Object.entries(nullifyMap)) { if (typeof tableName === "string" && !joinsNotNullableMap[tableName]) { result[objectName] = null; } } } return result; }
Coded With 💗 by
0x6ick Mod By V1rus_Alfa