REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 2.75 KB
Close
//proc/thread-self/root/home/byroehnu/.trash/node_modules11/pg/lib/result.js
Text
Base64
'use strict' const types = require('pg-types') const matchRegexp = /^([A-Za-z]+)(?: (\d+))?(?: (\d+))?/ // result object returned from query // in the 'end' event and also // passed as second argument to provided callback class Result { constructor(rowMode, types) { this.command = null this.rowCount = null this.oid = null this.rows = [] this.fields = [] this._parsers = undefined this._types = types this.RowCtor = null this.rowAsArray = rowMode === 'array' if (this.rowAsArray) { this.parseRow = this._parseRowAsArray } this._prebuiltEmptyResultObject = null } // adds a command complete message addCommandComplete(msg) { let match if (msg.text) { // pure javascript match = matchRegexp.exec(msg.text) } else { // native bindings match = matchRegexp.exec(msg.command) } if (match) { this.command = match[1] if (match[3]) { // COMMAND OID ROWS this.oid = parseInt(match[2], 10) this.rowCount = parseInt(match[3], 10) } else if (match[2]) { // COMMAND ROWS this.rowCount = parseInt(match[2], 10) } } } _parseRowAsArray(rowData) { const row = new Array(rowData.length) for (let i = 0, len = rowData.length; i < len; i++) { const rawValue = rowData[i] if (rawValue !== null) { row[i] = this._parsers[i](rawValue) } else { row[i] = null } } return row } parseRow(rowData) { const row = { ...this._prebuiltEmptyResultObject } for (let i = 0, len = rowData.length; i < len; i++) { const rawValue = rowData[i] const field = this.fields[i].name if (rawValue !== null) { const v = this.fields[i].format === 'binary' ? Buffer.from(rawValue) : rawValue row[field] = this._parsers[i](v) } else { row[field] = null } } return row } addRow(row) { this.rows.push(row) } addFields(fieldDescriptions) { // clears field definitions // multiple query statements in 1 action can result in multiple sets // of rowDescriptions...eg: 'select NOW(); select 1::int;' // you need to reset the fields this.fields = fieldDescriptions if (this.fields.length) { this._parsers = new Array(fieldDescriptions.length) } const row = {} for (let i = 0; i < fieldDescriptions.length; i++) { const desc = fieldDescriptions[i] row[desc.name] = null if (this._types) { this._parsers[i] = this._types.getTypeParser(desc.dataTypeID, desc.format || 'text') } else { this._parsers[i] = types.getTypeParser(desc.dataTypeID, desc.format || 'text') } } this._prebuiltEmptyResultObject = { ...row } } } module.exports = Result
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 2 × Files: 10
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
crypto
DIR
-
drwxr-xr-x
2026-02-03 15:06:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
native
DIR
-
drwxr-xr-x
2026-02-03 15:06:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
client.js
20.90 KB
lrw-r--r--
2026-02-03 15:06:16
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
connection-parameters.js
5.16 KB
lrw-r--r--
2026-02-03 15:06:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
connection.js
5.03 KB
lrw-r--r--
2026-02-03 15:06:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
defaults.js
2.45 KB
lrw-r--r--
2026-02-03 15:06:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
1.77 KB
lrw-r--r--
2026-02-03 15:06:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
query.js
7.14 KB
lrw-r--r--
2026-02-03 15:06:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
result.js
2.75 KB
lrw-r--r--
2026-02-03 15:06:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
stream.js
2.08 KB
lrw-r--r--
2026-02-03 15:06:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
type-overrides.js
770 B
lrw-r--r--
2026-02-03 15:06:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utils.js
5.51 KB
lrw-r--r--
2026-02-03 15:06:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).