156 Commits

Author SHA1 Message Date
Olivier Cavadenti
126b84639e
Support for 'is null' in 'order by' (#3667) (#4720) 2021-10-10 22:45:48 +03:00
Igor Savin
941b660f53
Initial infrastructure for CockroachDB (#4571) 2021-10-02 23:45:17 +03:00
Jeremy W. Sherman
a9338208f1
fix(oracledb): withRecursive: omit invalid RECURSIVE keyword, include column list [#4514] (#4652) 2021-09-03 22:27:32 +03:00
wolfcomp
4c79ac1fe6
Fix Analytic orderBy and partitionBy to follow the SQL documentation (#4602) 2021-08-30 20:17:16 +03:00
Egor Koldasov
c335fda657
#873 | implement delete with join (#4568) 2021-07-13 09:41:16 +03:00
Minh Son Nguyen
228b49f4af
[Typing] Add types for analytic functions (#4544) 2021-06-29 16:36:02 +03:00
Ardeshir81
6b420cebdf
Throw an error if negative offset is provided (#4361) 2021-03-25 11:30:25 +02:00
Igor Savin
511ea2be0f
Querybuilder cleanup (#4282) 2021-02-08 16:54:00 +02:00
Igor Savin
230845d3c2
Make "first" and "pluck" mutually exclusive (#4280) 2021-02-08 13:45:13 +02:00
Igor Savin
9c390036db
Move "parameter" out of formatter (#4275) 2021-02-04 15:54:26 +02:00
Igor Savin
2040bd11a4
Move more logic over from formatter (#4273) 2021-02-03 21:17:20 +02:00
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
Igor Savin
d89c36ae80
Move more code out of formatter (#4270) 2021-02-03 01:13:16 +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
Igor Savin
405b639c0c
Clean up querybuilder (#4222) 2021-01-11 00:38:15 +02:00
Igor Savin
b111771117
Clean up querybuilder (#4220) 2021-01-09 17:59:53 +02:00
Igor Savin
a889a09060
Extract even more formatter stuff into client (#4219) 2021-01-09 17:40:30 +02:00
Igor Savin
cd6479bf0b
More formatter cleanup (#4218) 2021-01-07 23:34:46 +02:00
Igor Savin
d78c65921f
More formatter extraction (#4215) 2021-01-07 17:48:14 +02:00
Igor Savin
a9773b79a3
Extract static methods outside of a formatter (#4213) 2021-01-07 02:04:10 +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
Igor Savin
6a862e9459
Extract query execution-related code from client (#4175) 2020-12-27 15:19:47 +02:00
Kkmatt11
629909475c
Fix MSSQL with returns on inserts and deletes on tables with triggers (#4152) 2020-12-18 01:12:04 +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
Ivan Zhuravlev
5845dc632f
feat(QueryBuilder): add method clear(statement) (#4051) 2020-10-29 01:18:32 +02:00
Bogdan Chadkin
80355e4850
Replace inherits package with builtin utility (#4059) 2020-10-05 23:59:12 +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
Igor Savin
e37aeaa31c
Prepare for 0.21.0 release (#3811) 2020-04-19 00:40:23 +02:00
tkalliom
02d94d96b0
Reduce size of lodash in bundle (#3804) 2020-04-18 19:41:23 +02:00
Edvaldo Szymonek
336b41e148
Add clearGroup method (#3771) 2020-04-13 01:09:51 +02:00
Kabir Baidhya
078b749892
Add unit tests for escape utility functions (#3742) 2020-03-22 18:44:51 +01:00
Igor Savin
85888ce3c2
Prepare to release 0.20.11 (#3689) 2020-03-05 21:43:57 +01:00
Lorefnon
589ea747c2
Update QueryCompiler implementation to use classes (#3647) 2020-02-01 17:22:00 +01:00
Kabir Baidhya
2800e72d2f Add tests for some of the string utility functions (#3568) 2020-01-04 22:59:41 +01:00
Igor Savin
4feefdf3d2 Enforce Unix (lf) line terminators (#3598) 2019-12-29 20:28:40 +01:00
Igor Savin
9b37c9480b
Return more information about empty updates (#3597) 2019-12-28 22:36:14 +01:00
Thomas Sondergaard
c277edbaf1 Use more efficient algorithm for generating internal ids (#3595) (#3596) 2019-12-27 20:16:38 +01:00
Lorefnon
f87b28c3e3 Add support for distinct on for postgres (#3513)
Resolves #3472
2019-11-11 00:51:47 +01:00
Edvard Chen
0560959fa4 feat: wrap subQuery with parenthesis when it appears as table name (#3496) 2019-10-28 21:38:01 +01:00
EthanHur
2d0459111d orderBy accepts QueryBuilder (#3491) 2019-10-24 16:08:12 +02:00
EthanHur
c53227564d add validation in .offset() (#2908) 2019-10-15 13:24:49 +02:00
Igor Savin
988fb24389
Fix MSSQL escaping (#3382) 2019-10-06 20:21:32 +02:00
Igor Savin
516b074790
Enable linting in CI (#3450) 2019-10-06 20:20:46 +02:00
Kristjan
4ade98980e feat: add undefined columns to undefined binding(s) error (#3425) 2019-09-04 22:59:04 +02:00
Felix Mosheev
8111bb3ee8 Feat: Allow to extend knex query builder (#3334) 2019-07-23 20:45:03 +02:00