518 Commits

Author SHA1 Message Date
Ihor Sakailiuk
09e9fa4193
Fix issue with schema usage with FROM clause contain QueryBuilder, function or Raw (#4268) 2021-02-03 19:16:00 +02:00
George Petrov
57184acd63
Primary keys improvements (#4266) 2021-02-03 14:47:32 +02:00
Ihor Sakailiuk
dbcc8a3228
Fix issue with .withSchema usage with joins on a subquery (#4267) 2021-02-03 00:23:50 +02:00
maximelkin
b9fb5992b5
Migrate to classes (#4253) 2021-01-31 12:40:13 +02:00
martinmacko47
50be910113
Allow optimizer hints (#4243) 2021-01-28 01:57:25 +02:00
Morgan Zolob
92907e80e2
Add check to only create native enum once (#3658)
Co-authored-by: Morgan Zolob <morgan.zolob@ingrooves.com>
2021-01-16 16:16:00 +02:00
Igor Savin
b111771117
Clean up querybuilder (#4220) 2021-01-09 17:59:53 +02:00
Igor Savin
a9773b79a3
Extract static methods outside of a formatter (#4213) 2021-01-07 02:04:10 +02:00
Igor Savin
c16b731fdc
Change default behaviour for transaction rollback (#4195) 2021-01-02 14:23:40 +02:00
Igor Savin
936126c0f0
Add analytic functions v2 (#4188)
Co-authored-by: CorvusCorrax <renaud.cayol@gmail.com>
Co-authored-by: Alexandre Tiertant <alexandre.tiertant@gmail.com>
2020-12-31 14:38:50 +02:00
Igor Savin
2aec21ed5e
Try to introduce some organization into how files are grouped (#4178) 2020-12-28 16:55:08 +02:00
Rijk van Zanten
9692e36561
Add primary/foreign support to SQLite on alterTable (#4162)
Co-authored-by: Igor Savin <iselwin@gmail.com>
2020-12-26 19:10:40 +02:00
Igor Savin
b4f5080097
Add GitHub Actions (#4168) 2020-12-22 10:28:58 +02:00
Ivan Starkov
84cee6c445
Fix performance of asyncStackTraces with enable-source-maps node flag (#4154) 2020-12-11 13:19:03 +02:00
Shunsuke Mano
4c42fa2520
Fix(seed:run): irregular seed file execution order (#4156) 2020-12-11 13:18:03 +02:00
Mark Boyd
76c131e2a9
Add support for WHERE clauses to "upsert" queries (#4148) 2020-12-09 17:51:29 +02:00
Rijk van Zanten
b7e1ffd7d5
Add support for dropForeign in SQLite (#4092)
Co-authored-by: Igor Savin <iselwin@gmail.com>
2020-12-08 14:49:41 +02:00
Nico Burns
8d43019873
Implement "UPSERT" (Postgres/MySQL/Sqlite) (#3763) 2020-10-31 17:22:52 +02:00
Igor Savin
26f3e5d62d
Replace uuid with copied nanoid logic (#4089) 2020-10-30 14:21:17 +02:00
Igor Savin
3246c1f9fa
Add missing event propagation (#4087) 2020-10-29 12:02:03 +02:00
Ivan Zhuravlev
5845dc632f
feat(QueryBuilder): add method clear(statement) (#4051) 2020-10-29 01:18:32 +02:00
Igor Savin
e52c5d6c6b
Make toQuery behavior consistent with pre-0.21.7 (#4083)
fixes https://github.com/mikro-orm/mikro-orm/issues/961
2020-10-27 10:09:22 +02:00
Igor Savin
20629af916
Fix comment escaping for MySQL and PostgreSQL (#4084) 2020-10-27 10:05:21 +02:00
Kkmatt11
4edd56f156
MSSQL '?' solution (#4053)
Escape properly if literal '?' is needed.
2020-10-26 20:39:12 +02:00
poliha
d3df4eb360
add migration stub for .cjs extension (#4065) 2020-10-24 17:56:09 +03:00
Jamie Peabody
8faaf9ce27
fixes apostrophe issue on mssql dialect (#4077)
Co-authored-by: Jamie Peabody <jpeabody@axway.com>
2020-10-24 17:55:02 +03:00
Bogdan Chadkin
80355e4850
Replace inherits package with builtin utility (#4059) 2020-10-05 23:59:12 +03:00
Guilherme Covre Dalleprane
975b5a919e
Ensure that semicolon is not appended to statements that already end with a semicolon (#4052) 2020-10-05 21:35:22 +03:00
Bogdan Chadkin
6f817a3b6e
Avoid lodash typecheks (#4056)
* Avoid lodash typecheks

Lodash is quite big project. Even with direct imports it loads [tons](https://github.com/knex/knex/pull/3804) of
code and still bloats node_modules. Especially since lodash mostly used
as a polyfill for modern features.

In this diff I attempted to reduce lodash usage by replacing type checks
with `typeof` operator which might be sufficient.

Also replaced lodash/isObject with custom simplified utility which does not
consider functions as objects and allows to simplify code in one place.
2020-10-05 21:29:39 +03:00
Simon Lorenz
b65245e1fe
warn if whereNot is used with 'in' or 'between' (#4038)
Co-authored-by: Simon Lorenz <simon.lorenz@stadt-duisburg.de>
2020-09-19 23:45:11 +03:00
Mathieu DARTIGUES
f3c73ccd58
Add new option for seed : recursive (#3974) 2020-08-10 15:10:37 +02:00
Harish Karumuthil
8ba73e568a
Escape single quoted values passed to defaultTo function (#3899) 2020-08-08 20:48:45 +03:00
Mathieu DARTIGUES
ab7644425d
Support multiple directories for seeds (#3967) 2020-08-08 15:21:43 +03:00
Keno Medenbach
2bd2ecd91c
MSSQL: Added the removal of a columns default constraint, before dropping the column (#3855) 2020-05-15 11:28:34 +02:00
Igor Savin
e37aeaa31c
Prepare for 0.21.0 release (#3811) 2020-04-19 00:40:23 +02:00
Brian Lauber
8d5715a03a
Fix: Support for .finally(..) on knex's Promise-alikes (#3800) 2020-04-15 21:05:40 +02:00
Edvaldo Szymonek
336b41e148
Add clearGroup method (#3771) 2020-04-13 01:09:51 +02:00
Kabir Baidhya
a6551559f0
Minor improvements on the usage of fs utilities - unify all the fs functions into the same util/fs to simplify things (#3749) 2020-03-24 15:50:47 +01:00
Kabir Baidhya
078b749892
Add unit tests for escape utility functions (#3742) 2020-03-22 18:44:51 +01:00
Kabir Baidhya
a7031c3cef
Upgrade package mkdirp and improve it's usage (#3741) 2020-03-21 11:01:10 +01:00
Florent Vilmart
998c92ca97
Typescript: Makes the ChainableInterface conform to Promise<T> (#3724) 2020-03-19 23:19:57 +01:00
Brian Lauber
0f523db957
Removed .should(..) syntax from test cases (#3713) 2020-03-09 10:10:33 -04:00
Brian Lauber
9d07bc97ea
Removed some globals from tests (#3712)
* `chai` is no longer global

* sinon is no longer globally defined

* expect(..) is no longer defined globally

* Removed obsolete eslint hints about globals

* Removed unused variable ( `expect(..)` )
2020-03-08 19:48:23 -04:00
Brian Lauber
05fedd9e11
Mark missing test cases as "pending" rather than "passed" (#3695)
* Missing test cases are marked as "pending" rather than "passed"
* Work-around for connection disposal bug in pooling logic...

See this conversation thread for more info: https://github.com/knex/knex/issues/3636#issuecomment-592005391
2020-03-02 01:04:01 +01:00
lando-cal
3bea3f66ec
Add OracleDB handling for buffer type in fetchAsString (#3685)
As released in [2.3.0](https://github.com/oracle/node-oracledb/blob/master/CHANGELOG.md#node-oracledb-v230-7-jun-2018) of node-oracledb, this adds handling to fetchAsString for the `BUFFER` type, allowing fetchAsString to interpret `RAW` fields.
2020-02-25 01:27:33 +01:00
maximelkin
8159f04c12
Remove dependency on bluebird methods from tests (#3682)
* Remove dependency on bluebird methods from tests
* Introduce `"chai-as-promised"` plugin
* Minor enhancements to the testing logic
2020-02-24 19:24:30 -05:00
Jake Coffman
22558209d4 dispose Oracle connection on connection error (#3611)
Co-authored-by: abskmj <abskmj@gmail.com>
2020-01-05 18:47:32 +01:00
Kabir Baidhya
2800e72d2f Add tests for some of the string utility functions (#3568) 2020-01-04 22:59:41 +01:00
Jake Coffman
07997279b7 fix #3605 not releasing connection from pool on disconnect (#3606) 2020-01-04 22:56:14 +01:00
Igor Savin
4feefdf3d2 Enforce Unix (lf) line terminators (#3598) 2019-12-29 20:28:40 +01:00