Charmander
981960b445
Remove confusing conditions ( #1159 )
...
* Remove unreachable code
* Remove redundant condition
Every path with `!this.values` results in `false` regardless of `this.binary`.
2016-12-13 07:50:07 -06:00
Charmander
5d821c3acb
Use more correct escaping for array elements ( #1177 )
...
It’s not JSON.
2016-12-10 17:28:48 -06:00
Illirik Smirnov
522d62229b
Resolve merge conflict in PR #1041 ( #1065 )
...
* Add license comment
* Delete pool.js
2016-06-24 10:56:43 -05:00
Muhammad Raihan Muhaimin
667953fd5c
Proper error message for undefined where options ( #1022 )
...
When user provides a knex select statement with an undefined options in where clause it is not properly handled an give an ambiguous error message telling `Unhandled rejection TypeError: Cannot read property 'toString' of undefined.` This PR will helpful to users at it will tell them the exact problem.
2016-06-07 16:04:52 -05:00
Seth Pollack
909c0f1872
add option to parse input Dates as UTC
2016-02-23 17:02:08 -08:00
Michael Nahkies
3a9f5c3500
wrap entry point to prepareValue to only accept 1 arg
2016-01-27 18:08:46 +13:00
Tim Griesser
cd050334ba
Removed various unused vars
2014-04-09 08:46:17 -04:00
Tim Griesser
0565ed6c05
Remove legacy .once events shim
2014-04-08 21:29:51 -04:00
Nikhil Benesch
619ba46ffe
pass prepareValue
hook to toPostgres
...
Pass `toPostgres` type-coercers a reference to the `prepareValue`
function to ease constructing literals composed of other Postgres types.
2014-04-03 10:28:02 -04:00
Nikhil Benesch
6ced524390
allow type-coercion overrides for custom objects
...
Attempt to call a `toPostgres` method on objects passed as query values
before converting them to JSON. This allows custom types to convert
themselves to the appropriate PostgreSQL literal.
This strategy is fully backwards-compatible and uses the same pattern as
the `toJSON` override.
2014-03-30 20:39:56 -04:00
Nikhil Benesch
c41eedc3e0
properly prepare complex arrays
...
`arrayString` duplicated too much of `prepareValue`'s logic, and so
didn't receive bugfixes for handling dates with timestamps. Defer to
`prepareValue` whenever possible.
This change enforces double-quote escaping of all array elements,
regardless of whether escaping is necessary. This has the side-effect of
properly escaping JSON arrays.
2014-03-30 19:12:18 -04:00
Nikhil Benesch
364cf4b3ca
utils: convert tabs to spaces
2014-03-30 19:11:02 -04:00
Nikhil Benesch
7faa2b325e
utils: reorganize prepareValue conditional for clarity
...
Prefer positive tests; group tests for specific objects.
2014-03-30 19:03:28 -04:00
Eugene Ware
4662d41972
bind Buffer variables as binary values
2013-09-19 01:50:42 +10:00
bmc
10e6d85266
Add support for JSON data type
...
requires >= 9.2 of postgres
2013-04-22 10:18:17 -05:00
Candid Dauth
694fc3eb6e
Fixing code style to make #238 pass jshint
2013-04-11 00:41:15 +02:00
Candid Dauth
bde871707b
Storing timezone-less dates in local time instead of UTC
...
Issue #225 caused such dates to be read, but not stored in local time.
2013-04-10 23:10:44 +02:00
brianc
c57eee8661
normalize whitespace, add comments, and do a little house cleaning
2013-03-06 10:26:40 -06:00
Andrew Dunstan
c5b88dbff2
make indentation and blocking style consistent.
2013-02-22 09:37:29 -05:00
Andrew Dunstan
a3af2a21cf
a visit from the jshint police
2013-02-21 17:45:46 -05:00
Andrew Dunstan
44b15422a0
allow passing JS array as a parameter instead of an array literal where SQL expects an array
2013-02-21 17:32:47 -05:00
Philipp Borgers
22d8538879
fix jshint errors for lib/utils.js
2013-01-24 22:03:02 +01:00
bmc
113b6298e2
use ConnectionParameters with native bindings and remove unused util functions
2013-01-22 23:23:47 -06:00
soletan
d55d145378
fixing support for Unix sockets in native binding
...
Binding natively connections to Unix sockets failed due to DNS lookups applied on pathname to Unix socket's folder.
2013-01-18 23:58:51 +01:00
Stephen Sugden
5dae2b267f
Extract query config normalization into utils
2012-12-16 00:58:30 -06:00
Nate Silva
4b88c82b16
enable IPv6 support when using native bindings
2012-11-03 11:40:36 -07:00
brianc
fa80b4e3fa
make data conversion the same between native & javascript
2012-07-11 22:47:02 -05:00
brianc
dd84db367b
reduce complexity of test runner
2012-05-30 22:12:14 -05:00
brianc
06585d6e2c
require 'util' instead of 'sys'
2011-10-10 19:40:52 -05:00
brianc
aa63f50437
remove custom pool code
2011-08-11 21:30:10 -05:00
brianc
94f670590f
support for connecting via hostname with native bindings (using node async dns lookup instead of sync libpq dns)
2011-05-05 19:13:43 -05:00
brianc
b18c981a82
remove unused functions of pool
2011-05-01 21:55:31 -05:00
brianc
0b97f699c5
merge master into topic
2011-03-03 18:31:20 +00:00
bmc
c0ef5296c6
support for connecting via domain socket
2011-03-01 20:35:14 +00:00
Brian Carlson
6a2adc1feb
more api compat
2011-02-23 19:40:52 -06:00
brianc
4724444e3d
move parseConnectionString utility function into utils
2011-02-04 20:06:52 -06:00
Brian Carlson
ab13d0c1eb
initial crack at connection pooling -- still dirty
2010-12-10 17:32:34 -06:00
Brian Carlson
169c6dc3ce
Pool object for use in connection pooling
2010-12-09 18:10:42 -06:00
brianc
d45c905978
added EventEmitter.once compatibility
2010-10-23 12:45:37 -05:00