Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pg-promise

Package Overview
Dependencies
Maintainers
1
Versions
629
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pg-promise - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

4

package.json
{
"name": "pg-promise",
"version": "0.0.6",
"description": "PG + Promise in and out of transactions",
"version": "0.0.7",
"description": "PG + Promise in and out of transactions.",
"main": "index.js",

@@ -6,0 +6,0 @@ "scripts": {

@@ -26,3 +26,3 @@ # Getting started

### The basics
In order to eliminate the chances of unexpected query results and make code more robust, each request is parametrized with the expected/supported return result, using type ````queryResult```` as shown below:
In order to eliminate the chances of unexpected query results and make code more robust, each request is parametrized with the expected/supported return result mask, using type ````queryResult```` as shown below:
````

@@ -92,12 +92,13 @@ queryResult = {

### Type Helpers
The library provides several basic helper functions to convert a basic type into proper PostgreSQL presentation that can be used to pass directly into queries or functions as parameters.
The library provides several helper functions to convert a basic javascript type into its proper PostgreSQL presentation that can be passed directly into queries or functions as parameters.
All of such helper functions are located within namespace ````pgp.as````:
````
pgp.as.bool(value); // reuturns proper postgresql boolean presentation
pgp.as.text(value); // reuturns proper postgresql text presentation, fixing quota symbols
pgp.as.date(value); // reuturns proper postgresql date/time presentation
pgp.as.bool(value); // returns proper postgresql boolean presentation
pgp.as.text(value); // returns proper postgresql text presentation, fixing single-quote symbols
pgp.as.date(value); // returns proper postgresql date/time presentation
````
These helpers are not associated with a connection, and can be called from inside or outside a transaction.
As these helpers are not associated with a connection, they can be called from inside or outside a transaction.
# Advanced
Work in progress. This chapter will be written just as the first version is finished.
Work in progress.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc