5184 Commits

Author SHA1 Message Date
Matheus Melo Antiquera
8150525354
fix: add support for mongodb v4 (#9450)
* fix: add support for mongodb driver v4

This new fix allow support to mongodb driver v4

Closes: #7907

* fix: add support for mongodb driver v4
This new fix allow support to mongodb driver v4

Closes: #7907

---------

Co-authored-by: Matheus Melo Antiquera <matheusantiquera@finchsolucoes.com.br>
2023-02-07 12:57:35 +05:00
Khaled Sameer
b3b0c118a4
fix: Incorrect enum default value when table name contains dash character (#9685)
* fix: get enum default value

* chore: format
2023-02-07 12:55:56 +05:00
Dmitry Zotov
7c00bb8e0e fixed wrong callback definition in tests 2023-02-07 12:51:06 +05:00
Aritz
8731858fbc
feat: support enableWal for the better-sqlite3 driver (#9619) 2023-02-07 12:44:36 +05:00
StefanZivkovic
c418aae39a
docs: update cli related docs (#9659)
- remove cli.entitiesDir description
- remove cli.subscribersDir description
- remove cli from Data Source Options example
- extend migration:run examples with -- -d path-to-datasource-config
- extend migration:revert examples with -- -d path-to-datasource-config
- extend migration:show examples with -- -d path-to-datasource-config
- extend migration:create examples with path-to-migrations-dir/migrationName

Co-authored-by: Stefan <stefi@sprintingsoftware.com>
2023-02-07 12:34:37 +05:00
ISary-ge
d2f37f6e72
feat: add find operator json contains (#9665)
* feature: add find operator json contains

* add test

---------

Co-authored-by: Игорь Сары <isary@MacBook-Pro-Igor.local>
Co-authored-by: dzvyagin <dzvyagin@team.amocrm.com>
2023-02-07 12:33:18 +05:00
Filip Wróbel
0eb74411d6
feat: naming strategy for legacy Oracle (#9703)
* feat: naming strategy for legacy Oracle

This feature is LegacyOracleNamingStrategy which can be used to handle Oracle error ORA-00972.

* feat: naming strategy for legacy Oracle

This feature is LegacyOracleNamingStrategy which can be used to handle Oracle error ORA-00972.
2023-02-07 11:58:09 +05:00
PronDmytro
7df2ccf69d
fix: sql expression when where parameter is empty array (#9691)
Closes: #9690

Co-authored-by: Dmitry Zotov <dmzt08@gmail.com>
2023-02-06 22:15:32 +05:00
Toshinori Tsugita
7726f5ad1e
fix: improved FindOptionsWhere behavior with union types (#9607)
* test: add test that where condition can accepts LessThan with Union

* fix: allow FindOptionsWhere to accept LessThan with Union

* added comment and simplified the type

---------

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
2023-02-06 21:28:36 +05:00
Vista1nik
c77c43e242
fix: resolve issue with "simple-enum" synchronization in SQLite (#9716)
* fix: resolve issue with "simple-enum" in sqlite

Closes: #9715

* trying to re-trigger CircleCI tests

---------

Co-authored-by: Dmitry Zotov <dmzt08@gmail.com>
2023-02-06 18:36:34 +05:00
Kilian Finger
b8704f87d2
fix: redundant Unique constraint on primary join column in Postgres (#9677)
* test: one migration for PrimaryColumn and JoinColumn in pg

* fix: stop postgres from creating unique on PrimaryColumn with JoinColumn
2023-02-06 18:28:07 +05:00
Umed Khudoiberdiev
1a9b9fbcd6 fix: make sure "require" is defined in the environment 2023-02-06 15:59:00 +05:00
Dev Aggarwal
6c9010e466
feat: allow mysql2 v3 as peerDependency (#9747)
Closes #9714
2023-02-06 15:53:50 +05:00
Vítor L. Brasil
ca315f0ad2
docs: Fix grammar error in the first paragraph. (#9759)
docs: Fix grammar (verbal agreement) error in the first paragraph.
2023-02-06 02:28:57 +05:00
Josh Heng
6fb212187f
fix: Fix grammar error in no migrations found log (#9754) 2023-02-05 13:31:28 +05:00
dependabot[bot]
63ab05fca1
build(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 (#9758)
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-05 13:16:05 +05:00
Zeeshan Haider Khan
c669f50bdd
docs: update many-to-many-relations.md (#9736) 2023-01-28 21:00:14 +05:00
Pavel Kolpakov
4df969ea62
fix: overriding caching settings when alwaysEnabled is true (#9731)
* 9023-2 Fix cache overriding option

* 9023-2 Fix format
2023-01-28 19:52:00 +05:00
Filip Wróbel
ef64bfc6c5
test: update multiple nested embedded entities (#9696)
* test: update multiple nested embedded entities

Closes: #1200

* test: update multiple nested embedded entities - fix for ORA-00972 - shorter names

Closes: #1200

* test: correct test name for issue 1200

Closes: #1200
2023-01-28 16:11:10 +05:00
Lukas Spiss
b937ae4afd
test: Add test to prove that issue #2331 is resolved (#9688) 2023-01-28 16:07:55 +05:00
Filip Wróbel
de84014509
chore: add *.iml to .gitignore (#9707) 2023-01-28 16:03:13 +05:00
변경연
6b37e3818b
fix: remove unnecessary .js extension in imports (#9713)
* fix: remove extension when importing file

* removed unnecessary .js extension in imports

---------

Co-authored-by: Dmitry Zotov <dmzt08@gmail.com>
2023-01-28 16:01:24 +05:00
summer-boythink
74f7f796aa
refactor: remove a deprecated function (#9702) 2023-01-11 14:30:02 +05:00
Mattias Fjellvang
defb409f56
feat: support time travel queries, upsert, enums, spatial types in cockroachdb (#9128)
* feature: adds support for enum type (fixes #9068)

* temporarily ran package to test on different repo

* playing around - bumped version

* Revert "playing around - bumped version"

This reverts commit 7df4adb3e698419c174c2daee88614f8dafdbb6c.

* Revert "temporarily ran package to test on different repo"

This reverts commit 48f394e8eb32c22fe757010b446c85740bf80b5f.

* feat: add support for geometry data type

* feature: properly hydrate enum array values

* feature: adds support for geography and geometry for cockroachdb

* bugfix: fixes issue with primary generated columns being invalid column type (fixes #8532)

* Revert "bugfix: fixes issue with primary generated columns being invalid column type (fixes #8532)"

This reverts commit e00cdb090638d34668e3e10acd5f8267fe3bd028.

* bugfix: type casts to string when using ANY

* feature: cast geometry/geography to geojson

* feature: added references to srid

* bugfix: prevent error if trying to close already closed connection

* feature: added cockrachodb as part of postgres family

* feature: ensures support for spatial columns for cockroachdb

* feature: adds support for UPSERT for CockroachDB (fixes #9199)

* minor: added TODO; unsure how to achieve this

* feature: adds support for time travelling queries for cockroachdb

* bugfix: only run time travel query on SELECT statements

* refactor: changed UsertType from 'upsert' to 'primary-key' since this is more logical

* feature: added posibility to set timeTravelQuery to false, instead of the parameter function; help for disabling time travel queries during tests

* feature: allow timeTravelQueries in find* queries

* bugfix: when using timetravel queries with joinAttributes it now prevents error 'AS OF SYSTEM TIME must be in top level' error

* lint

* minor fix

* fixed failing test

* implemented ENUM type;
added tests;

* fixed failing tests

* fixed failing test

* fixed spatial types synchronization;
implemented spatial indices;
added tests for spatial columns;

* refactored Time Travel Query functionality;
removed TTQ from find options;
added tests for TTQ;

* added docs for Time Travel Queries

* minor changes

* added GeoJSON types;
other minor fixes;

* updated docs

* updated docs

Co-authored-by: Dmitry Zotov <dmzt08@gmail.com>
2023-01-03 19:25:22 +05:00
Sho Ogawa
3e1caf0ff3
docs: fix some typo in migration document (#9667) 2023-01-03 13:12:24 +05:00
Dmitry Zotov
15a4eb942e removed titles from issue templates 2022-12-29 22:01:16 +05:00
James Jurach
18b659d129
fix: synchronizing View with schema broken for oracle (#9602)
* fix view+schema broken for oracle

* apply prettier

* fixed missing schema in loadViews();
added test (with .only)

* removed .only

Co-authored-by: James Jurach <James.Jurach@apiture.com>
Co-authored-by: Alex Messer <dmzt08@gmail.com>
2022-12-29 20:06:48 +05:00
Adrian Parry
67973b4726
fix: materialized hints support for cte (#9605)
Fix implementation of materialized hints in common table expressions
Previous behavior did not account for NOT MATERIALIZED hints, also
placed materialized hints in wrong place (before "AS")

Co-authored-by: Adrian Parry <adrian.parry@reign.cl>
2022-12-29 19:55:54 +05:00
sinkhaha
8668c29d83
feat: support busy_timeout param parameter for sqlite (#9623)
Co-authored-by: sinkhaha <1468709606@qq.com>
2022-12-29 18:52:55 +05:00
ayuvlasenko
4eda5df869
fix: allow to pass ObjectLiteral in mongo find where condition (#9632)
Closes: #9518
2022-12-29 18:51:54 +05:00
AlexMesser
b97633b6ce
Create SECURITY.md 2022-12-28 16:47:07 +05:00
JesseNeon
ae91c050a4
docs: correct typo (#9643) 2022-12-27 14:09:52 +05:00
Mahmoud Almontasser
95421ca62d
docs: correct a typo (#9651) 2022-12-27 14:09:14 +05:00
r-shirasu
648222a006
docs: correct typo (#9655) 2022-12-27 14:08:30 +05:00
AlexMesser
6c928a4aa0
fix: multiple select queries during db sync in sqlite (#9639)
* fixed multiple select queries during db sync in sqlite
2022-12-19 18:02:14 +05:00
Umed Khudoiberdiev
a95bed7c05
fix: DataSource.setOptions doesn't properly update the database in the drivers (#9635)
* make sure we update database in the driver if it was dynamically set (via dataSource.setOptions)

* removed validation for database since we definitely shouldn't have it in the constructor, database can be set later on (e.g. datasource.setOptions)
2022-12-18 08:04:17 +05:00
Saad A. Bazaz
82518125e4
docs: fix missing ) (#9629) 2022-12-16 20:50:31 +05:00
Umed Khudoiberdiev
0d72317b3d version bump 0.3.11 2022-12-03 23:24:38 +05:00
Kadir
a176c8bad3
fix : primary constraint name undefined error (#9576)
* fix : primary constraint name undefined erorr for PostgresQueryRunner.ts

* Update src/driver/postgres/PostgresQueryRunner.ts

Co-authored-by: leo-jnesis <55386067+leo-jnesis@users.noreply.github.com>

Co-authored-by: AlexMesser <dmzt08@gmail.com>
Co-authored-by: leo-jnesis <55386067+leo-jnesis@users.noreply.github.com>
2022-12-03 23:16:34 +05:00
Tim Beyer
6ba48bdc1b
feat: allow per-migration control over transaction behavior (#9459)
Closes #7087
2022-12-03 21:35:41 +05:00
Umed Khudoiberdiev
7386318858 fixed latest typescript-related issue 2022-12-03 21:15:46 +05:00
Derek Bonner
2c54381815
feat: allow for partial index conditions for on conflict statments in postgres (#8971)
* feat: allow for partial index conditions for on conflict statments in postgres

* fix: change variable to match postgres documentation and convert from array to string type

* fix: generalize use of index predicate. add documentation and expand test cases

* lint fix

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
Co-authored-by: Alex Messer <dmzt08@gmail.com>
2022-12-03 21:11:10 +05:00
Dmitry Zotov
2241b27e75 lint fix 2022-12-03 21:09:14 +05:00
Bartłomiej Rutkowski
93e14a928b
feat: Add synchronize to @JoinTable (#9442)
* feat: Add synchronize option to @JoinTable

Add synchronize option to @JoinTable. It allows to ignore JoinTable when syncing and generating migrations.

Closes #3443

* removed only

* lint fix

Co-authored-by: Bartlomiej Rutkowski <brutkowski@tilt.app>
Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
Co-authored-by: Alex Messer <dmzt08@gmail.com>
2022-12-03 21:05:24 +05:00
Morteza PRK
598e26980d
feat: implement exists query method (#9303)
Adding `Exists` method to query builder and EntityManager, to check whether a row exists given the conditions

Closes: #2815

Co-authored-by: mortzprk <mortz.prk@gmail.com>
2022-12-03 21:00:18 +05:00
Michael Wolz
53fad8f235
fix: disable transactionSupport option for CordovaDriver (#9391)
* fix: disable transaction support for cordova driver

the cordova-sqlite-storage plugin does not support transactions. fc4133c
introduced an exception when starting a transactions but did not disable
the transactionSupport in general leading to errors when using the
`save` and `remove` method of the `EntityPersistExecutor`. With this PR
the `EntityPersistExecutor` will respect the drivers `transactionSupport`
option.

* docs: add note on transaction limitations for cordova driver
2022-12-03 20:54:23 +05:00
Nedim Arabacı
f215e2d16f
feat: migration:generate successful exit the process with zero code (#9288) 2022-12-03 20:52:16 +05:00
userUndefined ✌️
09843078be
fix: fixed outdated init command (#9422)
* fix: Updating the samples current version of typeorm.

The cli sample was using the getRepository version in the UserController and in the current versions of the typeorm it was deprecated.
Basically I changed the code to the current version using AppDataSource.

* fix: improving code and fixing bugs

I made several changes to the functions because they had bugs, such as the id being a "string" instead of a "number",
the "userRepository" methods being outdated and checking the code to see if the user exists before doing some executions
2022-12-03 20:48:34 +05:00
Umed Khudoiberdiev
7fbc3ad084
Revert "fix: assign isInitialized: true at the end of .initialize() method (#9455)" (#9591)
This reverts commit 81fc9a9553938c4be3f959dbf68fd2e6c567ace9.
2022-12-03 20:38:55 +05:00
Dan Manastireanu
2473ff0a8e
feat: add parseInt8 option to postgres driver. Closes #9341 (#9435)
* feat: add parseInt8 option to postgres driver

* chore: formatting
2022-12-03 20:28:43 +05:00