5194 Commits

Author SHA1 Message Date
Umed Khudoiberdiev
b5a50c2efd fixing formatting 2023-02-07 19:58:34 +05:00
Umed Khudoiberdiev
700b46e6c7 Merge branch 'master' into using-import-types
# Conflicts:
#	src/entity-manager/EntityManager.ts
#	src/repository/BaseEntity.ts
#	src/repository/Repository.ts
2023-02-07 19:58:03 +05:00
Umed Khudoiberdiev
f07bdd0dac version bump 0.3.12 2023-02-07 19:53:47 +05:00
Umed Khudoiberdiev
d6def0d21f added eslint to fix the issues with imports (using import type syntax now) 2023-02-07 19:47:44 +05:00
कारतोफ्फेलस्क्रिप्ट™
7d1f1d6958
feat: support for SQL aggregate functions SUM, AVG, MIN, and MAX to the Repository API (#9737)
* feat: Add support for SQL aggregate functions SUM, AVG, MIN, and MAX to the Repository API

* rename field name to make tests work in oracle

* fix the comments

* update the docs

* escape column name

* address PR comment

* format the code
2023-02-07 19:01:04 +05:00
Umed Khudoiberdiev
4555211bcb
feat: update mssql dependency and other dependencies as well (#9763)
* updating dependencies

* fixing circleci config

* reverting mongodb version back

* increasing cli commands test timeout
2023-02-07 18:20:09 +05:00
Christian Forgács
12fdd73e25
refactor: use abstract logger to reduce duplicate code (#9751)
* feat(platform-tools): add more logging functions

* refactor(logger): add `AbstractLogger` to reduce duplicate code

---------

Co-authored-by: Christian Forgács <christian@wunderbit.de>
2023-02-07 17:34:37 +05:00
Dmitry Zotov
9bd3a641cc removed unnecessary .js extension in imports 2023-02-07 17:18:19 +05:00
ZBAGI
54ca9dd801
fix: incorrect sorting of entities with multi-inheritances (#9406)
* Fixed sorting of entities with multi-inheritances

* prettier

* added test case

---------

Co-authored-by: Alex Messer <dmzt08@gmail.com>
2023-02-07 15:42:32 +05:00
Umed Khudoiberdiev
adce6985d8
Revert "fix: add support for mongodb v4 (#9450)" (#9762)
This reverts commit 8150525354a7a66e68152ef7bd894ad93266d2af.
2023-02-07 13:08:41 +05:00
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