Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ResultSet

Represents the results of a SQL query.

It contains a list for the column names of the results, and a list of JsonArray - one for each row of the results.

Hierarchy

  • ResultSet

Index

Constructors

constructor

  • Returns ResultSet

  • Parameters

    Returns ResultSet

Methods

getColumnNames

  • getColumnNames(): string
  • Get the column names

    Returns string

getNext

  • Get the next result set

    Returns ResultSet

getNumColumns

  • getNumColumns(): number
  • Return the number of columns in the result set

    Returns number

getNumRows

  • getNumRows(): number
  • Return the number of rows in the result set

    Returns number

getOutput

  • getOutput(): any[]
  • Get the registered outputs

    Returns any[]

getResults

  • getResults(): any[]
  • Get the results

    Returns any[]

getRows

  • getRows(): {}
  • Get the rows - each row represented as a JsonObject where the keys are the column names and the values are the column values.

    Beware that it's legal for a query result in SQL to contain duplicate column names, in which case one will overwrite the other if using this method. If that's the case use ResultSet instead.

    Be aware that column names are defined as returned by the database, this means that even if your SQL statement is for example:

    SELECT a, b FROM table
    the column names are not required to be:
    a
    and

    b
    and could be in fact
    A
    and
    B
    .

    For cases when there is the need for case insentivitity you should see ResultSet

    Returns {}

    • [key: string]: any

setColumnNames

  • setColumnNames(columnNames: string): ResultSet
  • Get the column names

    Parameters

    • columnNames: string

    Returns ResultSet

setNext

  • Get the next result set

    Parameters

    Returns ResultSet

setOutput

  • Get the registered outputs

    Parameters

    • output: any[]

    Returns ResultSet

setResults

  • Get the results

    Parameters

    • results: any[]

    Returns ResultSet

Generated using TypeDoc