api documentation for pg (v6.1.5)

PostgreSQL client - pure javascript & libpq with the same API

table of contents

  1. module pg
    1. function pg.Client (config)
    2. function pg.Connection (config)
    3. function pg.Pool (options)
    4. function pg.Pool.super_ (options, Client)
    5. function pg.Query (config, values, callback)
    6. function pg.connection_parameters (config)
    7. function pg.query (native)
    8. function pg.result (rowMode)
    9. function pg.type_overrides (userTypes)
    10. number pg._eventsCount
    11. object pg.Client.prototype
    12. object pg.Connection.prototype
    13. object pg.Pool.super_.prototype
    14. object pg.Query.prototype
    15. object pg._events
    16. object pg._pools
    17. object pg.connection_parameters.prototype
    18. object pg.defaults
    19. object pg.domain
    20. object pg.native
    21. object pg.query.prototype
    22. object pg.result.prototype
    23. object pg.type_overrides.prototype
    24. object pg.types
    25. object pg.types.arrayParser
    26. object pg.utils
  2. module pg.Client
    1. function pg.Client (config)
    2. function pg.Client.Query (config, values, callback)
    3. function pg.Client.md5 (string)
    4. function pg.Client.super_ ()
  3. module pg.Client.prototype
    1. function pg.Client.prototype._pulseQueryQueue ()
    2. function pg.Client.prototype.cancel (client, query)
    3. function pg.Client.prototype.connect (callback)
    4. function pg.Client.prototype.copyFrom (text)
    5. function pg.Client.prototype.copyTo (text)
    6. function pg.Client.prototype.end (cb)
    7. function pg.Client.prototype.escapeIdentifier (str)
    8. function pg.Client.prototype.escapeLiteral (str)
    9. function pg.Client.prototype.getStartupConf ()
    10. function pg.Client.prototype.getTypeParser (oid, format)
    11. function pg.Client.prototype.query (config, values, callback)
    12. function pg.Client.prototype.setTypeParser (oid, format, parseFn)
  4. module pg.Connection
    1. function pg.Connection (config)
    2. function pg.Connection.super_ ()
  5. module pg.Connection.prototype
    1. function pg.Connection.prototype._readValue (buffer)
    2. function pg.Connection.prototype._send (code, more)
    3. function pg.Connection.prototype.attachListeners (stream)
    4. function pg.Connection.prototype.bind (config, more)
    5. function pg.Connection.prototype.cancel (processID, secretKey)
    6. function pg.Connection.prototype.close (msg, more)
    7. function pg.Connection.prototype.connect (port, host)
    8. function pg.Connection.prototype.describe (msg, more)
    9. function pg.Connection.prototype.end ()
    10. function pg.Connection.prototype.endCopyFrom ()
    11. function pg.Connection.prototype.execute (config, more)
    12. function pg.Connection.prototype.flush ()
    13. function pg.Connection.prototype.parse (query, more)
    14. function pg.Connection.prototype.parseA (buffer, length)
    15. function pg.Connection.prototype.parseC (buffer, length)
    16. function pg.Connection.prototype.parseCString (buffer)
    17. function pg.Connection.prototype.parseD (buffer, length)
    18. function pg.Connection.prototype.parseE (buffer, length)
    19. function pg.Connection.prototype.parseField (buffer)
    20. function pg.Connection.prototype.parseG (buffer, length)
    21. function pg.Connection.prototype.parseGH (buffer, msg)
    22. function pg.Connection.prototype.parseH (buffer, length)
    23. function pg.Connection.prototype.parseInt16 (buffer)
    24. function pg.Connection.prototype.parseInt32 (buffer)
    25. function pg.Connection.prototype.parseK (buffer, length)
    26. function pg.Connection.prototype.parseMessage (buffer)
    27. function pg.Connection.prototype.parseN (buffer, length)
    28. function pg.Connection.prototype.parseR (buffer, length)
    29. function pg.Connection.prototype.parseS (buffer, length)
    30. function pg.Connection.prototype.parseT (buffer, length)
    31. function pg.Connection.prototype.parseZ (buffer, length)
    32. function pg.Connection.prototype.parsed (buffer, length)
    33. function pg.Connection.prototype.password (password)
    34. function pg.Connection.prototype.query (text)
    35. function pg.Connection.prototype.readBytes (buffer, length)
    36. function pg.Connection.prototype.readString (buffer, length)
    37. function pg.Connection.prototype.requestSsl ()
    38. function pg.Connection.prototype.sendCopyFail (msg)
    39. function pg.Connection.prototype.sendCopyFromChunk (chunk)
    40. function pg.Connection.prototype.startup (config)
    41. function pg.Connection.prototype.sync ()
  6. module pg.Pool
    1. function pg.Pool (options)
    2. function pg.Pool.super_ (options, Client)
  7. module pg.Pool.super_
    1. function pg.Pool.super_ ()
  8. module pg.Pool.super_.prototype
    1. function pg.Pool.super_.prototype._create (cb)
    2. function pg.Pool.super_.prototype._destroy (client)
    3. function pg.Pool.super_.prototype._promise (cb, executor)
    4. function pg.Pool.super_.prototype._promiseNoCallback (callback, executor)
    5. function pg.Pool.super_.prototype.connect (cb)
    6. function pg.Pool.super_.prototype.end (cb)
    7. function pg.Pool.super_.prototype.query (text, values, cb)
    8. function pg.Pool.super_.prototype.take (cb)
  9. module pg.Query
    1. function pg.Query (config, values, callback)
    2. function pg.Query.super_ ()
  10. module pg.Query.prototype
    1. function pg.Query.prototype._getRows (connection, rows)
    2. function pg.Query.prototype.catch (callback)
    3. function pg.Query.prototype.handleCommandComplete (msg, con)
    4. function pg.Query.prototype.handleCopyData (msg, connection)
    5. function pg.Query.prototype.handleCopyInResponse (connection)
    6. function pg.Query.prototype.handleDataRow (msg)
    7. function pg.Query.prototype.handleEmptyQuery (con)
    8. function pg.Query.prototype.handleError (err, connection)
    9. function pg.Query.prototype.handlePortalSuspended (connection)
    10. function pg.Query.prototype.handleReadyForQuery (con)
    11. function pg.Query.prototype.handleRowDescription (msg)
    12. function pg.Query.prototype.hasBeenParsed (connection)
    13. function pg.Query.prototype.prepare (connection)
    14. function pg.Query.prototype.promise ()
    15. function pg.Query.prototype.requiresPreparation ()
    16. function pg.Query.prototype.submit (connection)
    17. function pg.Query.prototype.then (onSuccess, onFailure)
  11. module pg.connection_parameters
    1. function pg.connection_parameters (config)
  12. module pg.connection_parameters.prototype
    1. function pg.connection_parameters.prototype.getLibpqConnectionString (cb)
  13. module pg.query
    1. function pg.query (native)
    2. function pg.query.super_ ()
  14. module pg.query.prototype
    1. function pg.query.prototype.catch (callback)
    2. function pg.query.prototype.handleError (err)
    3. function pg.query.prototype.promise ()
    4. function pg.query.prototype.submit (client)
    5. function pg.query.prototype.then (onSuccess, onFailure)
  15. module pg.result
    1. function pg.result (rowMode)
  16. module pg.result.prototype
    1. function pg.result.prototype._getTypeParser (oid, format)
    2. function pg.result.prototype._parseRowAsArray (rowData)
    3. function pg.result.prototype.addCommandComplete (msg)
    4. function pg.result.prototype.addFields (fieldDescriptions)
    5. function pg.result.prototype.addRow (row)
    6. function pg.result.prototype.parseRow (rowData)
  17. module pg.type_overrides
    1. function pg.type_overrides (userTypes)
  18. module pg.type_overrides.prototype
    1. function pg.type_overrides.prototype.getOverrides (format)
    2. function pg.type_overrides.prototype.getTypeParser (oid, format)
    3. function pg.type_overrides.prototype.setTypeParser (oid, format, parseFn)
  19. module pg.types
    1. function pg.types.getTypeParser (oid, format)
    2. function pg.types.setTypeParser (oid, format, parseFn)
    3. object pg.types.arrayParser
  20. module pg.types.arrayParser
    1. function pg.types.arrayParser.create (source, transform)
  21. module pg.utils
    1. function pg.utils.normalizeQueryConfig (config, values, callback)
    2. function pg.utils.prepareValue (value)

module pg

function pg.Client (config)

function pg.Connection (config)

function pg.Pool (options)

function pg.Pool.super_ (options, Client)

function pg.Query (config, values, callback)

function pg.connection_parameters (config)

function pg.query (native)

function pg.result (rowMode)

function pg.type_overrides (userTypes)

module pg.Client

function pg.Client (config)

function pg.Client.Query (config, values, callback)

function pg.Client.md5 (string)

function pg.Client.super_ ()

module pg.Client.prototype

function pg.Client.prototype._pulseQueryQueue ()

function pg.Client.prototype.cancel (client, query)

function pg.Client.prototype.connect (callback)

function pg.Client.prototype.copyFrom (text)

function pg.Client.prototype.copyTo (text)

function pg.Client.prototype.end (cb)

function pg.Client.prototype.escapeIdentifier (str)

function pg.Client.prototype.escapeLiteral (str)

function pg.Client.prototype.getStartupConf ()

function pg.Client.prototype.getTypeParser (oid, format)

function pg.Client.prototype.query (config, values, callback)

function pg.Client.prototype.setTypeParser (oid, format, parseFn)

module pg.Connection

function pg.Connection (config)

function pg.Connection.super_ ()

module pg.Connection.prototype

function pg.Connection.prototype._readValue (buffer)

function pg.Connection.prototype._send (code, more)

function pg.Connection.prototype.attachListeners (stream)

function pg.Connection.prototype.bind (config, more)

function pg.Connection.prototype.cancel (processID, secretKey)

function pg.Connection.prototype.close (msg, more)

function pg.Connection.prototype.connect (port, host)

function pg.Connection.prototype.describe (msg, more)

function pg.Connection.prototype.end ()

function pg.Connection.prototype.endCopyFrom ()

function pg.Connection.prototype.execute (config, more)

function pg.Connection.prototype.flush ()

function pg.Connection.prototype.parse (query, more)

function pg.Connection.prototype.parseA (buffer, length)

function pg.Connection.prototype.parseC (buffer, length)

function pg.Connection.prototype.parseCString (buffer)

function pg.Connection.prototype.parseD (buffer, length)

function pg.Connection.prototype.parseE (buffer, length)

function pg.Connection.prototype.parseField (buffer)

function pg.Connection.prototype.parseG (buffer, length)

function pg.Connection.prototype.parseGH (buffer, msg)

function pg.Connection.prototype.parseH (buffer, length)

function pg.Connection.prototype.parseInt16 (buffer)

function pg.Connection.prototype.parseInt32 (buffer)

function pg.Connection.prototype.parseK (buffer, length)

function pg.Connection.prototype.parseMessage (buffer)

function pg.Connection.prototype.parseN (buffer, length)

function pg.Connection.prototype.parseR (buffer, length)

function pg.Connection.prototype.parseS (buffer, length)

function pg.Connection.prototype.parseT (buffer, length)

function pg.Connection.prototype.parseZ (buffer, length)

function pg.Connection.prototype.parsed (buffer, length)

function pg.Connection.prototype.password (password)

function pg.Connection.prototype.query (text)

function pg.Connection.prototype.readBytes (buffer, length)

function pg.Connection.prototype.readString (buffer, length)

function pg.Connection.prototype.requestSsl ()

function pg.Connection.prototype.sendCopyFail (msg)

function pg.Connection.prototype.sendCopyFromChunk (chunk)

function pg.Connection.prototype.startup (config)

function pg.Connection.prototype.sync ()

module pg.Pool

function pg.Pool (options)

function pg.Pool.super_ (options, Client)

module pg.Pool.super_

function pg.Pool.super_ ()

module pg.Pool.super_.prototype

function pg.Pool.super_.prototype._create (cb)

function pg.Pool.super_.prototype._destroy (client)

function pg.Pool.super_.prototype._promise (cb, executor)

function pg.Pool.super_.prototype._promiseNoCallback (callback, executor)

function pg.Pool.super_.prototype.connect (cb)

function pg.Pool.super_.prototype.end (cb)

function pg.Pool.super_.prototype.query (text, values, cb)

function pg.Pool.super_.prototype.take (cb)

module pg.Query

function pg.Query (config, values, callback)

function pg.Query.super_ ()

module pg.Query.prototype

function pg.Query.prototype._getRows (connection, rows)

function pg.Query.prototype.catch (callback)

function pg.Query.prototype.handleCommandComplete (msg, con)

function pg.Query.prototype.handleCopyData (msg, connection)

function pg.Query.prototype.handleCopyInResponse (connection)

function pg.Query.prototype.handleDataRow (msg)

function pg.Query.prototype.handleEmptyQuery (con)

function pg.Query.prototype.handleError (err, connection)

function pg.Query.prototype.handlePortalSuspended (connection)

function pg.Query.prototype.handleReadyForQuery (con)

function pg.Query.prototype.handleRowDescription (msg)

function pg.Query.prototype.hasBeenParsed (connection)

function pg.Query.prototype.prepare (connection)

function pg.Query.prototype.promise ()

function pg.Query.prototype.requiresPreparation ()

function pg.Query.prototype.submit (connection)

function pg.Query.prototype.then (onSuccess, onFailure)

module pg.connection_parameters

function pg.connection_parameters (config)

module pg.connection_parameters.prototype

function pg.connection_parameters.prototype.getLibpqConnectionString (cb)

module pg.query

function pg.query (native)

function pg.query.super_ ()

module pg.query.prototype

function pg.query.prototype.catch (callback)

function pg.query.prototype.handleError (err)

function pg.query.prototype.promise ()

function pg.query.prototype.submit (client)

function pg.query.prototype.then (onSuccess, onFailure)

module pg.result

function pg.result (rowMode)

module pg.result.prototype

function pg.result.prototype._getTypeParser (oid, format)

function pg.result.prototype._parseRowAsArray (rowData)

function pg.result.prototype.addCommandComplete (msg)

function pg.result.prototype.addFields (fieldDescriptions)

function pg.result.prototype.addRow (row)

function pg.result.prototype.parseRow (rowData)

module pg.type_overrides

function pg.type_overrides (userTypes)

module pg.type_overrides.prototype

function pg.type_overrides.prototype.getOverrides (format)

function pg.type_overrides.prototype.getTypeParser (oid, format)

function pg.type_overrides.prototype.setTypeParser (oid, format, parseFn)

module pg.types

function pg.types.getTypeParser (oid, format)

function pg.types.setTypeParser (oid, format, parseFn)

module pg.types.arrayParser

function pg.types.arrayParser.create (source, transform)

module pg.utils

function pg.utils.normalizeQueryConfig (config, values, callback)

function pg.utils.prepareValue (value)

[ this document was created with utility2 ]