pg-promise
Advanced tools
Comparing version 0.0.6 to 0.0.7
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
103
32117