4805 Commits

Author SHA1 Message Date
Joe Flateau
d0393197dd
docs: document npm run pack (#8349) 2021-11-10 19:40:40 +05:00
Joe Flateau
3f981975d4
feat: add upsert methods for the drivers that support onUpdate (#8104)
* feat: add upsert methods for the drivers that support it

This adds EntityManager#upsert, BaseEntity#upsert and EntityManager#upsert

Closes: #2363

* docs: Document which drivers support upsert operations

* docs: fix typo in entity manager upsert many example

* refactor: remove mongodb style upsert signature, enforce types of conflict paths

* docs: add note to repository docs specifying which drivers support upsert

* refactor: cannot staticly type conflict paths because that would break typescript pre-4

* refactor: remove test utility methods in favor of some repeated checks
2021-11-10 00:09:49 +05:00
Dimitris Halatsis
969af958ba
feat: Postgres IDENTITY Column support (#7741)
* feat: extend column options interfaces to also support Postgres10+ Identity generationStrategy

* feat: extend PrimaryGeneratedColumn support for Postgres10+ identity

* feat: update buildCreateColumnSql with Postgres10+ IDENTITY support

* feat: update loadTables for Postgres10+ IDENTITY column recognition

* doc: add description of identity support for PrimaryGeneratedColumn

* test: add test for SQL of table with IDENTITY COLUMN in Postgres 10+

* feat: take identity generation type into consideration when checking for changed column

* fix: better non behavior changing way of checking for identity column

* chore: rebase and resolve PR conversations
2021-11-10 00:00:31 +05:00
Umed Khudoiberdiev
1588c58539
revert: "feat: use char(36) for uuid representation in mysql (#7853)" (#8343)
This reverts commit 063aafa34408dd9b1ed3802bb43be6f772523277.
2021-11-09 22:55:38 +05:00
Umed Khudoiberdiev
ae858ad4bc
removed buggy david badge 2021-11-09 20:06:31 +05:00
Umed Khudoiberdiev
41ee95c1fb version bump 2021-11-09 20:00:31 +05:00
Hong Truong
f79ae589cd
feat: support using custom index with SelectQueryBuilder in MySQL (#7755)
* Support using custom index for MySqlDriver.

* Update select-query-builder.md

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
0.2.39
2021-11-09 17:24:16 +05:00
MG
4aaafdffe2
build: local development with oracle (#7881) 2021-11-09 14:00:14 +05:00
Umed Khudoiberdiev
1371ac3b6e fixed failing CI test 2021-11-09 13:58:12 +05:00
das-mensch
96929302a4
fix: attach FOR NO KEY UPDATE lock to query if required (#8008)
FOR NO KEY UPDATE was introduced in typeorm 0.2.25 but the relevant query
part was never added due to missing check in FindOptionUtils

Closes: #7717
2021-11-08 19:35:43 +05:00
Lukas Windisch
e4d4636391
feat: add relation options to all tree queries (#8080)
* feat: add relation options to all tree queries

Closes: #8076

* fix: corrected array index in test case

* try to fix failing test

* fix: sort the array in order to be able to apply tests
2021-11-08 19:00:39 +05:00
Dice
19d4a914a5
feat: add typeorm command wrapper to package.json in project template (#8081)
* feat: add `typeorm` command wrapper to package.json in project template

* style: fix comma style in InitCommand (PR #8081)
2021-11-08 18:52:46 +05:00
Joe Flateau
6929ae3e44
chore: add a script to produce a packed tgz of the module (#8110)
This makes it easier to install custom builds in local projects
2021-11-06 18:16:49 +05:00
Anton Kudinov
1649882d33
fix: ordering by joined columns for PostgreSQL (#3736) (#8118) 2021-11-05 21:12:15 +05:00
Jannik Mewes
655829592e
fix: OneToManySubjectBuilder bug with multiple primary keys (#8221)
* Bugfix: OneToManySubjectBuilder generated invalid subjects because of failed matching of relation IDs.

* relation.getEntityValue does not always return an array. Fix by defaulting to empty array on falsy return value.

* Add tests

* test fixes

* Refactor tests ensuring composite keys on child side into a separate test suite @ functional tests

* Rewrite tests and notes to correctly document+show what's the actual issue

* Fix: test must not use Promise.all, parallel execution against different drivers would mess up the counter within the SettingSubscriber!

* code updates

* okay now I know we need this check

Co-authored-by: Jannik <jannik@jannikmewes.de>
Co-authored-by: jannik.wjm@gmail.com <>
Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
2021-11-05 20:16:07 +05:00
julius-welink
28c183e9df
fix: defaults type cast filtering in Cockroachdb (#8144)
* fix: defaults type cast filtering

This fixes column default value in cockroachdb continuously producing schema changes when there should be none

Refs: #7110

* fix: defaults type cast filtering

Remove debugging code

Refs: #7110
2021-11-04 20:46:21 +05:00
coyoteecd
4638dea55d
fix: do not generate migration for unchanged enum column (#8161) (#8164) 2021-11-04 20:33:40 +05:00
Cem Yilmaz
25271d78b8
docs: update decorator-reference.md (#8123)
* Update decorator-reference.md

* Update decorator-reference.md

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
2021-11-02 23:00:31 +05:00
James Ward
1197f88138
refactor: unwrap promises where possible (#8234) 2021-10-29 13:39:11 -04:00
Vivek Nathani
ef33cf48ac
docs: provide example for setting up redis cache (#8311)
Closes #7924
2021-10-28 19:43:53 +05:00
Ruslan Terekhov
dc6f1c91be
feat: more informative logging in case of migration failure (#8307)
* More informative log about migration failure

* Update MigrationExecutor.ts

Co-authored-by: Ruslan Terekhov <ruslan.t@upland.me>
Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
2021-10-28 19:43:00 +05:00
Chris Duff
bc55836fff
test: simplified test for issue #8018 (#8308)
* test: create simplified test for https://github.com/typeorm/typeorm/issues/8018

* test: improve test title for issue 8018 to be consistent with project

Co-authored-by: cduff <chris@praxhub.com>
2021-10-28 10:16:19 +05:00
Umed Khudoiberdiev
0adad8810e
Revert "fix: STI types on children in joins (#3160)" (#8309)
This reverts commit 60a6c5d9607e06bfb2ff842d733ff90ce8b279ea.
2021-10-27 21:07:56 +05:00
Svetlozar Argirov
2c861afaef
feat: add dependency configuraiton for views #8240 (#8261)
* feat: Add dependency configuraiton for views #8240

Add dependsOn option to @View decorator, where dependencies can be listed. Also use these dependencies to order draop/create view correctly when generating migrations

* fix: Make dropping views dependencies more readable

Rename some variables in viewDependencyChain  in RdbmsSchemaBuilder and add more thorough comments, so its more readable.

Co-authored-by: Svetlozar <ext-svetlozar@getitdone.co>
2021-10-26 17:38:52 +05:00
modem7
179ae7534c
docs: update README.md (#8302)
Improving grammar of readme to better follow the rest of the readme file.
2021-10-26 16:37:09 +05:00
Itay Garin
cf281ef70c
docs: add link to react example (#8209) 2021-10-22 21:25:51 +05:00
Dan Crews
2133ffea9c
feat: add the ability to pass the driver into all database types (#8259)
* feat: add the ability to pass the driver into all database types

* refactor: use this.options instead of through the connection
2021-10-22 14:38:28 +05:00
Andrii
4ad3a61037
fix: cli should accept absolute paths for --config 2021-10-21 16:59:48 +05:00
Antonio Eugenio
9f14e48828
fix: create a different cacheId if present for count query in getManyAndCount (#8283)
Closes #4277
2021-10-21 16:48:56 +05:00
Jimoh Rildwan Adekunle
503d1dc882
docs: fixed typo from from an to in (#8276) 2021-10-20 19:17:11 +05:00
Sagar Yadav
b6c828cc6c
docs: fix grammar issues in README (#8282)
Fixed some grammar mistakes
2021-10-18 13:46:04 -04:00
Daniel Pekevski
861573377b
fix: NativescriptQueryRunner's query method fails when targeting es2017 (#8182) 2021-10-05 23:22:12 -04:00
James Ward
dd94c9d38d
refactor: abstract away Broadcaster boilerplate (#8235) 2021-10-03 21:57:05 -04:00
James Ward
d8c58122a6
chore: drop yargonaut as it is no longer maintained (#8236) 2021-10-03 16:34:40 -04:00
James Ward
0bc194cad5
chore: npm update (#8238) 2021-10-02 21:45:02 -04:00
James Ward
b6788072c2
fix: support DeleteResult in SQLiteDriver (#8237) 2021-10-02 18:43:28 -04:00
James Ward
d7d19e94dc
chore(release): 0.2.38 0.2.38 2021-10-02 13:30:27 -04:00
瓜牛
324f1d8d8b
docs: translate 'Avoid foreign key constraint creation' section to Chinese (#8211) 2021-10-02 13:09:28 -04:00
tzahush
75ed3c3db0
docs: add examples for querying soft-deleted records (#8138) 2021-10-02 13:08:04 -04:00
Shiroyasha
8d989bc5a1
docs: question.categories.filter should return a boolean (#8192) 2021-10-02 13:05:13 -04:00
Shoaib Ahmed
d8f6037291
doc: improve sentence structure in tree entities section (#8142) 2021-10-02 12:50:19 -04:00
Jakub Semik
d4111ce0cb
docs: use correct spelling of synchronization (#8204)
syncronization -> synchronization
2021-10-02 12:39:59 -04:00
singlebyte
a868078f8f
docs: fix typo (#8119) 2021-08-28 11:28:30 -04:00
James Ward
e560706ece
chore: update slack invite link (#8126) 2021-08-28 11:17:24 -04:00
julius-welink
749511d981
fix: snakecase conversion for strings with numbers (#8111) 2021-08-24 20:01:45 -04:00
James Ward
22676a04c3
fix: use full path for table lookups (#8097)
The changes made as part of #7575 fixed some issues and introduced others. The problem became that the table name would be compared against the EntityMetadata tablePath. This would fail in some cases because while the EntityMetadata would specify database, it'd be the "default"/current database & would be omitted from the table name.

To work around that this PR introduces the database & schema on the table objects as well as a fully-qualified table path property which will always include all of them for comparing against EntityMetadata.
2021-08-24 17:49:07 -04:00
James Ward
e9366b33dd
fix: prevent using absolute table path in migrations unless required (#8038) 2021-08-17 20:07:38 -04:00
James Ward
b858f84e6f
feat: support QueryRunner.stream with Oracle (#8086) 2021-08-17 19:24:07 -04:00
James Ward
02f0bce19d
chore(release): 0.2.37 0.2.37 2021-08-13 02:26:49 -04:00
Sahibjot Saggu
01a038cbf9
docs: add correct MongoDB installation version (#8073) 2021-08-13 01:54:58 -04:00