* Normalized and validated driverNames of test db clients and fixed oracle test setup
* Fixed failed queries from old query building tests which hadn't been ran in ages
* Allow selecting node version which is used to run oracledb docker tests
* Improved sql tester error messages
* Fixed rest of the oracledb tests
* Removed invalid flag from docker-compose
* Print mssql logs if initialization fails
* Fixed syntax error + final tests
* Added restart of failure for mssql DB initialization to try again if server was not ready
* Printout always mssql logs after container is started
* Fixed wait time printing after trying to connect
* Use npm run oracledb:test for testing oracle in travis
* Fixed float type of mssql to be float
* Many tests where postgres test was not actually ran at all
* Migrations to be mssql compatible
Mssql driver doesn't handle if multiple queries are sent to same transaction concurrently.
* Prevented mssql failing when invalid schema builder was executed by accident
Instead of trying to generate sql from broken schema calls, just make exception to leak before query compiling is started
* Fixed mssql trx rollback to always throw an error
Also modified some connection test query to be mssql compatible
* Fixed various bugs from MSSQL driver to make tests run
* Fixed mssql unique index to be compatible with other dialect implementations
* Enable running mssql tests on CI
* Test for #2588
* Updated tests to not be dependend on tables left from previous test rans
* Trying to make mssql server work on travis
* Add a Redshift dialect that inherits from Postgres.
* Turn .index() and .dropIndex() into no-ops with warnings in the Redshift dialect.
* Update the Redshift dialect to be compatible with master.
* Update package.json
* Disable liftoff cli
* Remove the CLI
* Add lib to the repo
* Allow the escaping of named bindings.
* Update dist
* Update the Redshift dialect’s instantiation of the query and column compilers.
* Update the distribution
* Fix a merge conflict
* Take lib back out
* Trying to bring back in line with tgreisser/knex
* Add npm 5 package-lock
* Bring cli.js back in line
* Bring cli.js back in line
* Progress commit on redshift integration tests
* Revert "Progress commit on redshift integration tests"
This reverts commit 207e31635c638853dec54ce0580d34559ba5a54c.
* Progress commit
* Working not null on primary columns in createTable
* Working redshift unit tests
* Working unit and integration tests, still need to fix migration tests
* Brought datatypes more in line with what redshift actually supports
* Added query compiler unit tests
* Add a hacky returning clause for redshift ugh
* Working migration integration tests
* Working insert integration tests
* Allow multiple insert returning values
* Working select integration tests
* Working join integration tests
* Working aggregate integration tests
* All integration suite tests working
* Put docker index for reconnect tests back
* Redshift does not support insert...returning, there does not seem to be a way around that, therefore accept it and test accordingly
* Leave redshift integration tests in place, but do not run them by default
* Fix mysql order by test
* Fix more tests
* Change test db name to knex_test for consistency
* Address PR comments
* Sublime Text gitignore
* Redshift does not support adding more than one column in alter table
* Fix integration tests for redshift
* Linter
* Combine dialect test skip if clause
* GH-2550 Add support to wrap returning column
- utilize `this.formatter.wrap` for every columnName in returningClause
* #2550 Add unit test
* Fix unit test
* test(QueryBuilder): add test for countDistinct with multiple columns
* test: add integration test for countDistinct with multiple columns
* feat(QueryBuilder): support multiple columns for countDistinct
* feat(QueryBuilder): support object alias notation for aggregate methods
i.e. `count`, `countDistinct`, `max`, `min`, `avg`, `avgDistinct`, `sum`, `sumDistinct`
* test: fix integration tests for countDistinct
* fix(QueryBuilder): fix countDistinct formatting with multiple columns
* refactor(QueryBuilder): add _aggregate from helpers
* fix(QueryCompiler): only use parens for distinct with postgres
* test(QueryBuilder): remove unsupported tests
for count with multiple distinct columns in databases where this is
not supported
* refactor(QueryBuilder): improve readability
* Support multi-column `whereIn` with query
Add support for supplying a subquery for a `whereIn` statment on multiple columns.
Fixes#1384.
* Fixed method
* Removed duplicate import
* Fixed isArray calls and linter warnings
* Fixed isArray call
* Fixed tests and added assertions for all dialects
* Add a Redshift dialect that inherits from Postgres.
* Turn .index() and .dropIndex() into no-ops with warnings in the Redshift dialect.
* Update the Redshift dialect to be compatible with master.
* Update package.json
* Disable liftoff cli
* Remove the CLI
* Add lib to the repo
* Allow the escaping of named bindings.
* Update dist
* Update the Redshift dialect’s instantiation of the query and column compilers.
* Update the distribution
* Fix a merge conflict
* Take lib back out
* Trying to bring back in line with tgreisser/knex
* Add npm 5 package-lock
* Bring cli.js back in line
* Bring cli.js back in line
* Progress commit on redshift integration tests
* Revert "Progress commit on redshift integration tests"
This reverts commit 207e31635c638853dec54ce0580d34559ba5a54c.
* Progress commit
* Working not null on primary columns in createTable
* Working redshift unit tests
* Working unit and integration tests, still need to fix migration tests
* Brought datatypes more in line with what redshift actually supports
* Added query compiler unit tests
* Add a hacky returning clause for redshift ugh
* Working migration integration tests
* Working insert integration tests
* Allow multiple insert returning values
* Working select integration tests
* Working join integration tests
* Working aggregate integration tests
* All integration suite tests working
* Put docker index for reconnect tests back
* Redshift does not support insert...returning, there does not seem to be a way around that, therefore accept it and test accordingly
* Leave redshift integration tests in place, but do not run them by default
* Fix mysql order by test
* Fix more tests
* Change test db name to knex_test for consistency
* Address PR comments
* feat(query-builder): add hookContext for wrapIdentifier
* refactor: use isUndefined
* test(transaction): test passing of hookContext
* feat(runnner): pass context to postProcessResponse
* test(runner): test postProcessResponse for raw responses
* test(raw): test passing of hookContext
* feat: add hookContext to Raw and SchemaBuilder
* test(transaction): fix test for hookContext
* chore: fix lint error
* fix: check for hookContext before calling it
* test(transaction): fix hookContext test
* chore: remove whitespace
* test(hookContext): test cloning of context object
* refactor: hookContext -> queryContext
* minor: use more descriptive variable name
i.e. refactor: `context` => `queryContext`
* fix: remove unnecessary checks for query builder
* fix(Raw): pass query builder to formatter
* fix(SchemaCompiler): pass schema builder to formatter
* refactor: add addQueryContext helper
* feat: add queryContext to TableBuilder and ColumnBuilder
* fix(TableCompiler): pass table builder to formatter
* fix(ColumnCompiler): pass column builder to formatter
* fix(pushQuery): fix passing builder to formatter
* test(Schema|Table|ColumnCompiler): test passing queryContext
* fix(SchemaCompiler): pass queryContext to TableCompiler
* fix(TableCompiler): pass queryContext to ColumnCompiler
* test: add queryContext tests for all schema dialects
* test(TableCompiler): test overwriting queryContext from SchemaCompiler
* test(Raw): test passing queryContext to wrapIdentifier
* tests: run all the tests
* added object syntax for aliases
* added mixed tests for alias pair feature
* fixed double aliasing for subqueries
* fixed last untested commit
* Added support for passing query builder inside object syntax and using the syntax in raw identifiers
The aggregate methods include `count`, `min`, `max`, `sum`, `avg`,
`countDistinct`, `sumDistinct`, and `avgDistinct`, all of which
can now receive raw expressions, e.g.
```js
knex('users').count(knex.raw("data->'active'"));
```
There seems to be some demand for this, and I think it's cleaner than the alternative of
```js
knex('users').select(knex.raw("count(data->'active')"));
```
* 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
* Test composition of two cross joins
* Test cross-join with 'on' statement
(same as inner join) only for sqlite3 and mysql
because not supported elsewhere
* Allow casting when using named bindings.
* Remove template string in test.
* Only replace matches that are member to the bindings object.
* Slight refactor for tests.
* Simplify regex.
* Allow casting on named identifiers.
* adding support for ONLY keyword for PostgreSQL as an optional flag of from() and into() through table(tableName, only)
* passing only parameter from default function was missing
* changing only option to options object with only key
* better style per @wubzz suggestion
* 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