Class: PgResult

reactive-pg-client-js/pg_result~ PgResult

new PgResult()

Represents the result of an operation on database.
Source:

Methods

columnsNames() → {Array.<string>}

Get the names of columns in the PgResult.
Source:
Returns:
the list of names of columns.
Type
Array.<string>

next() → {PgResult}

Return the next available result or null, e.g for a simple query that executed multiple queries or for a batch result.
Source:
Returns:
the next available result or null if none is available
Type
PgResult

rowCount() → {number}

Get the number of the affected rows in the operation to this PgResult.

The meaning depends on the executed statement:

  • INSERT: the number of rows inserted
  • DELETE: the number of rows deleted
  • UPDATE: the number of rows updated
  • SELECT: the number of rows retrieved
Source:
Returns:
the count of affected rows.
Type
number

size() → {number}

Get the number of rows in the PgResult.
Source:
Returns:
the count of rows.
Type
number

value() → {Object}

Get the result value.
Source:
Returns:
the result
Type
Object