* Use number instead of number | string for return type of count
Closes#3247
* Use an alias instead of interface for DeferredKeySelection
This prevents typescript from complaining when it has to be used in an exported signature without us having to expose internal type as public
Closes#3259
* Make count result type overridable
* Disable interface-over-type-literal rule
- Make count generic, especially useful when being used with an alias object argument
- In case of alias object, partially infer the return type from the input.
* Add ability to run migrate:up command to only run the next migration
* Add cli test for migrate:up
* Add test for migrator
* Add stub
* Add type
* Fix wording of test
- Fix: update, insert, delete didn't support deferring of result resolution unlike select.
So knex.insert(...).into<User>('users') would fall back to any
- Correctly handling cases when deferred selection keys get cleared later eg. multiple returning invocations, clearSelect.
- Fix: first resolves to array member rather than array.
- Add explanations for some of the complex type applications.
* make unionAll()'s call signature match union()
consolidates the logic used by union() and unionAll(), allowing the two to be used interchangeably
* use spread args instead of arguments array
* Fix unionAll spread arguments
* [#3033] fix: sqlite3 drop/renameColumn() breaks with postProcessResponse
* When postProcessResponse is configured, and client.processResponse()
returns a Promise (e.g. for custom cases such as sqlite3 dropColumn()),
then that Promise is not awaited, but handed to postProcessResponse,
which might break is (e.g. with Objection's knexSnakeCaseMappers()).
* when reinserting data in the modified table, the rows are now being
handled with the "mapped" identifiers (instead of the unmapped)
* add tests, fix hasColumn
* add hasColumn tests for add mysql + snakeCaseMappers
* Improve tests and fix more cases related to processing
* Fix SQLite-specific tests
* MySQL is not case-sensitive, pg is
* Add size parameter to integer method
Size parameter work when we pass it. But it's not in definition.
* Change parameter to length
* Update knex.d.ts
Fix typo
* schemaName is missing in MigratorConfig typings
add a schemaName value to MigratorConfig.
* update MigratorConfig typings
- change type of `directory` from `string` to `string | string[]`
- add `sortDirsSeparately` as boolean optional config.
Add constraintName optional argument to TableBuilder.primary() TypeScript definition.
Currently, if you give the second argument, TS will tell that primary() expects only 1 argument, when in fact it supports the second optional argument to define the constraint name into the database.
* Implemented extra boolean param for rollback()
Extra parameter allows all migrations to be rolled back.
* Removed spurious log
* Removed stray debugger instruction
* Moved to arrow functions