* Make postgres client wrapIdentifierImpl independent of `this` context
* Also fixes a bug where only single digit indices were accepted.
* add customWrapIdentifier helper for client
* customWrapIdentifier is one more level of abstraction for the wrapIdentifier "pipeline"
that allows the custom wrapIdentifier to be called without calling the `wrapIdentifierImpl`
* bufix: use custom wrapIdentifier in columnInfo. fixes#2402
* Exposed also positionBinding method to client base class and refactored calls to em
* Added toSQL().toNative() getter which returns dialect specfic sql and bindings.
* Refactored toSQL method implementation
* fixes#1833 on postgres
* adds @elhigu requested changes
* adds test when database is down
* adds script for docker support
* removes old comment
* fixes syntax
* fixes more syntax errors
* fixes final syntax errors
* Docker testing enabled only on linux for now
* # This is a combination of 3 commits.
# The first commit's message is:
Allow passing config.version variable to knex instead of parsing the DB version from string returned form DB server.
This makes it possible to connect custom databases which are compatible with an official database of certain version.
# The 2nd commit message will be skipped:
# Update checkVersion
#
# To use `const` instead of `let` to fix lint error
# The 3rd commit message will be skipped:
# Revert "Update checkVersion"
#
# This reverts commit 248907decb94f0df2f2b3b9fe114738fb48394fc.
* Allow passing config.version variable to knex instead of parsing the DB version from string returned form DB server.
This makes it possible to connect custom databases which are compatible with an official database of certain version.
Without calling `close()`, the `queryStream` will continue to execute a
query meaning there was no way to halt a long running query due to an
unrecoverable downstream error. I ran into this issue while streaming
IDs from a very large table as part of an ETL process. An error would
occur downstream in the transformation or loading step and I needed to
cancel the long-running extract stream, but there was no way to do so
and I'd eventually run out of connections in the pool.
This commit also handles the case when the non-callback version of
stream API was used and an exception was thrown. The issue was that the
promise was not reachable and therefore there was no way to add a
rejection handler. This resulted in an unavoidable `Unhandled Promise
Rejection` error.
* Modify test suite to test #1602
We shouldn’t be testing the “default” client class. Replace any
usages with postgresql
* Simplify knex.raw, deprecate global Knex.raw usage
* Remove unused bluebird shim
* Remove old / unused test comments
* Don't capture Pool2 error event
* Fix pg string escaping & parameterization #1602, #1548