Socket
Socket
Sign inDemoInstall

@types/libpq

Package Overview
Dependencies
2
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.8.6 to 1.8.7

115

libpq/index.d.ts

@@ -48,3 +48,3 @@ // Type definitions for libpq 1.8

*
* @returns {(boolean|string)} true if the cancel request was sent; a string error message if
* @returns true if the cancel request was sent; a string error message if
* the cancel request failed for any reason. The string will

@@ -62,3 +62,3 @@ * contain the error message provided by libpq.

/**
* @returns {string} the status string associated with a result. Something akin to INSERT 3 0
* @returns the status string associated with a result. Something akin to INSERT 3 0
* if you inserted 3 rows.

@@ -69,3 +69,3 @@ */

/**
* @returns {string} the number of tuples (rows) affected by the command. Even though this is a
* @returns the number of tuples (rows) affected by the command. Even though this is a
* number, it is returned as a string to mirror libpq's behavior.

@@ -86,4 +86,4 @@ */

*
* @param {string} connectParams an optional string
* @param {Function} callback mandatory. It is called when the connection has successfully been
* @param connectParams an optional string
* @param callback mandatory. It is called when the connection has successfully been
* established.

@@ -98,3 +98,3 @@ */

*
* @param {string} connectionParams an optional string
* @param connectionParams an optional string
*/

@@ -107,3 +107,3 @@ connectSync(connectionParams?: string): void;

*
* @returns {boolean} true if data was read; false if there was an error. You can access
* @returns true if data was read; false if there was an error. You can access
* error details with [[Libpq.errorMessage]].

@@ -118,4 +118,2 @@ */

* been lost.
*
* @returns {string}
*/

@@ -127,4 +125,2 @@ errorMessage(): string;

* connection but does not perform any I/O.
*
* @param {string} input
*/

@@ -136,4 +132,2 @@ escapeIdentifier(input: string): string;

* but does not perform any I/O.
*
* @param {string} input
*/

@@ -145,3 +139,3 @@ escapeLiteral(input: string): string;

*
* @param {string} [commandText=""] a required string of the query.
* @param [commandText=""] a required string of the query.
*/

@@ -153,4 +147,4 @@ exec(commandText?: string): void;

*
* @param {string} [commandText=""] a required string of the query.
* @param {Array.<(string|number)>} [parameters=[]] a required array of string values
* @param [commandText=""] a required string of the query.
* @param [parameters=[]] a required array of string values
* corresponding to each parameter in the

@@ -165,4 +159,4 @@ * commandText.

*
* @param {string} [statementName=""] a required string of the name of the prepared statement.
* @param {Array.<(string|number)>} [parameters=[]] the parameters to pass to the prepared
* @param [statementName=""] a required string of the name of the prepared statement.
* @param [parameters=[]] the parameters to pass to the prepared
* statement.

@@ -180,3 +174,3 @@ */

*
* @returns {number} 1 if socket is not write-ready at which case you should call
* @returns 1 if socket is not write-ready at which case you should call
* [[Libpq.writable]] with a callback and wait for the socket to be writable

@@ -190,5 +184,2 @@ * and then call [[Libpq.flush]] again; 0 if all data was flushed; -1 if

* Retrieve the name of the field (column) at the given offset. Offset starts at 0.
*
* @param {number} fieldNumber
* @returns {string}
*/

@@ -199,5 +190,2 @@ fname(fieldNumber: number): string;

* Retrieve the Oid of the field (column) at the given offset. Offset starts at 0.
*
* @param {number} fieldNumber
* @returns {number}
*/

@@ -210,6 +198,6 @@ ftype(fieldNumber: number): number;

*
* @param {boolean} [async=false] a boolean. Pass false to block waiting for data from the
* @param [async=false] a boolean. Pass false to block waiting for data from the
* backend. Defaults to false.
*
* @returns {Buffer|number} a node buffer if there is data available; 0 if the copy is still in
* @returns a node buffer if there is data available; 0 if the copy is still in
* progress (only if you have called [[Libpq.setNonBlocking]](true));

@@ -221,5 +209,3 @@ * -1 if the copy is completed; -2 if there was an error.

/**
* @param {number} tupleNumber
* @param {number} fieldNumber
* @returns {boolean} true if the value at the given offsets is actually null. Otherwise
* @returns true if the value at the given offsets is actually null. Otherwise
* returns false. This is because [[Libpq.getvalue]] returns an empty

@@ -237,3 +223,3 @@ * string for both an actual empty string and for a null value. Weird, huh?

*
* @returns {boolean} true if libpq was able to read buffered data & parse a result object;
* @returns true if libpq was able to read buffered data & parse a result object;
* false if there are no results waiting to be parsed. Generally doing async

@@ -249,6 +235,2 @@ * style queries you'll call this repeadedly until it returns false and then

* at 0. A null value is returned as the empty string ''.
*
* @param {number} tupleNumber
* @param {number} [fieldNumber]
* @returns {string}
*/

@@ -258,3 +240,3 @@ getvalue(tupleNumber: number, fieldNumber?: number): string;

/**
* @returns {boolean} true if calling [[Libpq.consumeInput]] would block waiting for more
* @returns true if calling [[Libpq.consumeInput]] would block waiting for more
* data; false if all data has been read from the socket. Once this returns false it is

@@ -266,3 +248,3 @@ * safe to call [[Libpq.getResult]].

/**
* @returns {boolean} true if non-blocking mode is enabled; false if disabled.
* @returns true if non-blocking mode is enabled; false if disabled.
*/

@@ -273,4 +255,2 @@ isNonBlocking(): boolean;

* Retrieve the number of fields (columns) from the result.
*
* @returns {number}
*/

@@ -291,4 +271,2 @@ nfields(): number;

* ```
*
* @returns {Libpq.NotifyMsg}
*/

@@ -299,4 +277,2 @@ notifies(): Libpq.NotifyMsg;

* Retrieve the number of tuples (rows) from the result.
*
* @returns {number}
*/

@@ -309,6 +285,6 @@ ntuples(): number;

*
* @param {Buffer} buffer a required node buffer of text data such as
* @param buffer a required node buffer of text data such as
* Buffer('column1\tcolumn2\n')
*
* @returns {number} 1 if sent succesfully; 0 if the command would block (only if you have
* @returns 1 if sent succesfully; 0 if the command would block (only if you have
* called [[Libpq.setNonBlocking]](true)); -1 if there was an error sending

@@ -323,5 +299,5 @@ * the command.

*
* @param {string} [errorMessage] an optional string you can pass to cancel the copy operation.
* @param [errorMessage] an optional string you can pass to cancel the copy operation.
*
* @returns {number} 1 if sent succesfully; 0 if the command would block (only if you have
* @returns 1 if sent succesfully; 0 if the command would block (only if you have
* called [[Libpq.setNonBlocking]](true)); -1 if there was an error sending

@@ -336,5 +312,5 @@ * the command.

*
* @param {string} statementName a required string of name of the statement to prepare.
* @param {string} commandText a required string of the query.
* @param {number} nParams a count of the number of parameters in the commandText.
* @param statementName a required string of name of the statement to prepare.
* @param commandText a required string of the query.
* @param nParams a count of the number of parameters in the commandText.
*/

@@ -354,3 +330,2 @@ prepare(statementName: string, commandText: string, nParams: number): void;

* ```
* @returns {Libpq.ResultError}
*/

@@ -362,4 +337,2 @@ resultErrorFields(): Libpq.ResultError;

* have an error.
*
* @returns {string}
*/

@@ -369,3 +342,3 @@ resultErrorMessage(): string;

/**
* @returns {string} either PGRES_COMMAND_OK or PGRES_FATAL_ERROR depending on the status of
* @returns either PGRES_COMMAND_OK or PGRES_FATAL_ERROR depending on the status of
* the last executed command.

@@ -378,4 +351,4 @@ */

*
* @param {string} [commandText=""] a required string containing the query text.
* @returns {boolean} true if the command was sent succesfully or false if it failed to send.
* @param [commandText=""] a required string containing the query text.
* @returns true if the command was sent succesfully or false if it failed to send.
*/

@@ -387,6 +360,6 @@ sendQuery(commandText?: string): boolean;

*
* @param {string} [commandText=""] a required string containing the query text.
* @param {Array.<(string|number)>} [parameters=[]] an array of parameters as strings used in
* @param [commandText=""] a required string containing the query text.
* @param [parameters=[]] an array of parameters as strings used in
* the parameterized query.
* @returns {boolean} true if the command was sent succesfully or false if it failed to send.
* @returns true if the command was sent succesfully or false if it failed to send.
*/

@@ -398,6 +371,6 @@ sendQueryParams(commandText?: string, parameters?: Array<string|number>): boolean;

*
* @param {string} statementName a required string of name of the statement to prepare.
* @param {string} commandText a required string of the query.
* @param {number} nParams a count of the number of parameters in the commandText.
* @returns {boolean} true if the command was sent succesfully or false if it failed to send.
* @param statementName a required string of name of the statement to prepare.
* @param commandText a required string of the query.
* @param nParams a count of the number of parameters in the commandText.
* @returns true if the command was sent succesfully or false if it failed to send.
*/

@@ -409,5 +382,5 @@ sendPrepare(statementName: string, commandText: string, nParams: number): boolean;

*
* @param {string} [statementName=""] a required string of the name of the prepared statement.
* @param {string[]} [parameters=[]] the parameters to pass to the prepared statement.
* @returns {boolean} true if the command was sent succesfully or false if it failed to send.
* @param [statementName=""] a required string of the name of the prepared statement.
* @param [parameters=[]] the parameters to pass to the prepared statement.
* @returns true if the command was sent succesfully or false if it failed to send.
*/

@@ -424,6 +397,6 @@ sendQueryPrepared(statementName?: string, parameters?: string[]): boolean;

*
* @param {boolean} [nonBlocking] true to set the connection to use non-blocking writes, false to
* @param [nonBlocking] true to set the connection to use non-blocking writes, false to
* use blocking writes.
*
* @returns {boolean} true if the socket's state was succesfully toggled, false if there was
* @returns true if the socket's state was succesfully toggled, false if there was
* an error.

@@ -434,3 +407,3 @@ */

/**
* @returns {number} an int representing the file descriptor for the socket used internally by
* @returns an int representing the file descriptor for the socket used internally by
* the connection.

@@ -458,6 +431,2 @@ */

* and PQflush for async writing.
*
* @param {Function} callback
*
* @returns {Libpq}
*/

@@ -464,0 +433,0 @@ writable(callback: () => void): this;

{
"name": "@types/libpq",
"version": "1.8.6",
"version": "1.8.7",
"description": "TypeScript definitions for libpq",

@@ -9,3 +9,4 @@ "license": "MIT",

"name": "Vlad Rindevich",
"url": "https://github.com/Lodin"
"url": "https://github.com/Lodin",
"githubUsername": "Lodin"
}

@@ -22,5 +23,4 @@ ],

},
"peerDependencies": {},
"typesPublisherContentHash": "bdd7d5e476c1a2af410ac9f86a6157db79aabae421c2dc40ba55a85e61f27b93",
"typesPublisherContentHash": "572783c3c343320d01a19076f9409f4bf4c6783baf0e635d4b24b5ba02f334b9",
"typeScriptVersion": "2.2"
}

@@ -11,3 +11,3 @@ # Installation

Additional Details
* Last updated: Tue, 25 Jul 2017 17:56:27 GMT
* Last updated: Wed, 25 Oct 2017 01:03:56 GMT
* Dependencies: events, buffer, node

@@ -14,0 +14,0 @@ * Global values: none

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc