5572 Commits

Author SHA1 Message Date
Mike Guida
9f889b3490
chore: clarify commit practices (#11472) 2025-05-13 16:37:47 -06:00
Denes Antonio de Souza
144634d4c0
feat(spanner): support insert returning (#11460)
* Update SpannerDriver.ts

* Update package.json

* Update package.json

* Update package.json

* Update package-lock.json

* Update package.json

* #11453

* Revert "Update package.json"

This reverts commit 20f24de10cda62ad0c9a368b14290fbb4f355b32.

* Revert "Update package.json"

This reverts commit bcf6678e95b57570ea526935bb7490c9b11a16da.

* Update package.json

* Revert "Update package-lock.json"

This reverts commit a003e5659336b38b8cade5f1605c17f7c3e59673.

* #11460

* #11460

* FIX/Spanner Numeric type value string

* #11460 Test functional spanner

* test: update returning tests

* refactor: simplify condition

* style: fix lint/format

* test: fix returning test for spanner

---------

Co-authored-by: Lucian Mocanu <alumni@users.noreply.github.com>
2025-05-13 22:45:53 +02:00
Christian Forgács
e9eaf79604
Fix/11466 mssql find operator (#11468)
* chore: enable driver `mssql` for test of issue #3113

* chore: add test case for #11298 to issue #11285 to prevent functionality of #11285

* fix: unhandled find operator with array value for mssql (#11466)

* fixup! fix: unhandled find operator with array value for mssql (#11466)

* Revert "chore: enable driver `mssql` for test of issue #3113"

This reverts commit a302d63eeac5892e920d97705b4230414ef81e6d.

* fixup! chore: add test case for #11298 to issue #11285 to prevent functionality of #11285

---------

Co-authored-by: Christian Forgács <christian@wunderbit.de>
2025-05-13 12:45:06 +12:00
Simon Garner
23bb1ee271
feat: add updateAll and deleteAll methods to EntityManager and Repository APIs (#11459)
* Add updateAll() methods

* Add deleteAll() methods

* Fix softDelete/restore error messages

* Add test for Repository.delete() with criteria

* Add test for Repository.deleteAll() method

* Move/rename “Repository > delete” test files

* Tweak comments

* Add tests for Repository update methods

* Add updateAll and deleteAll to EntityManager API docs

* Add updateAll and deleteAll to Repository API docs

* Fix tests
2025-05-13 12:33:44 +12:00
Simon Garner
a6b61f7645
chore: include warning about update({}) in changelog (#11471)
* chore: include warning about update({}) in changelog

* chore: be more specific about affected methods
2025-05-13 12:22:34 +12:00
Mike Guida
6d1c4f0186
build: ensure coveralls flag-name is unique by db, node and client versions (#11461) 2025-05-12 15:36:10 -06:00
Mike Guida
1198dc2934
chore: add note about breaking change in 0.3.23 (#11469) 2025-05-12 12:48:20 -06:00
Mike Guida
39a6562a64
refactor: remove unused NamingStrategyNotFoundError (#11462) 2025-05-12 09:18:58 -06:00
Lukasz Otczyk
15de733e28
perf: improve save performance during entities update
Co-authored-by: Lukasz Otczyk <lukasz.otczyk@nexontis.com>
2025-05-11 22:37:46 +03:00
Naor Peled
2168441e6c
fix(ci): resolve pkg.pr.new publish failure
Co-authored-by: AmirHossein Sakhravi <amirhosseinpr184@gmail.com>
2025-05-11 19:53:08 +03:00
Maxim Bronnikov
a213bbd215
chore: Add husky and lint-staged (#11448)
Co-authored-by: maxbronnikov10 <maxbronnikov2004@gmail.com>
2025-05-08 21:53:45 -06:00
Eliya Cohen
c464ff87cb
feat: add tagged template for executing raw SQL queries (#11432)
* Added a new SQL tagged template feature for executing raw SQL queries with automatic parameter handling.

---------

Co-authored-by: Simon Garner <simon@equalogic.com>
2025-05-09 13:19:40 +12:00
Michael Bromley
80e9b3004a
chore: Version 0.3.23 (#11439) 0.3.23 2025-05-07 12:03:48 +02:00
Maxim Bronnikov
b94dfb3e31
fix: update/delete/softDelete by criteria of condition objects (#10910)
Co-authored-by: maxbronnikov10 <maxbronnikov2004@gmail.com>
2025-05-06 15:30:05 -06:00
Mike Guida
3ffeea590f
docs: clarify where to add tests (#11438) 2025-05-05 12:39:07 -06:00
Naor Peled
274bdf2e1a
feat: publish PR releases using pkg.pr.new 2025-05-02 23:09:42 +03:00
Lucian Mocanu
fadad1a74c
fix: cleanup after streaming in sap hana (#11399) 2025-05-01 22:48:09 +02:00
TanguyPoly
b9842e3be9
fix: beforeQuery promises not awaited before query execution (#11086)
* fix: beforeQuery promises not awaited before query execution

Closes: #11085

* fix: run format

Closes: #11085

* fix: apply same beforeQuery & afterQuery logic to all drivers

* fix: use a different broadcaster for BeforeQuery / AfterQuery

* fix: BeforeQuery / AfterQuery event types

* fix: move broadCasterResult.wait in finally block

* fix: remove duplicated broadcasterResult.wait in ReactNativeQueryRunner

* fix: fix prettier issue

* fix: implemented requested changes

* fix: broken sqlite tests

* Revert "fix: broken sqlite tests"

This reverts commit 4bacd5f4b55bb09297e9086decefe62f08ceead0.

* Revert "fix: implemented requested changes"

This reverts commit 1d2f59bf2bf8ec276f84bcd8b840ca5420c4088f.

* review: undefined type at the end

* fix: move database connection logic outside of the promise bloc

---------

Co-authored-by: Lucian Mocanu <alumni@users.noreply.github.com>
2025-05-01 09:16:32 +12:00
Mike Guida
9464e6522a
build: setup testing matrix for postgres 14 and 17 (#11433) 2025-04-30 10:25:56 -06:00
Mohamed Nader Baccari
a61654e079
fix: change how array columns are compared on column changed detection (#11269)
* fix: change how array columns are compared on column changed detection

Closes: #5967

* add tests with date array colum

* Normalize date arrays before comparing
2025-04-30 11:33:12 +12:00
Caíque de Castro Soares da Silva
61a6f971af
fix: prevent error when replication is undefined (#11423)
* fix: prevent error when replication is undefined

* fix format

* add test

* update test name

* fix test

* fix test

* skip test

* add unit test

* fix unit test

* fix unit test
2025-04-25 14:30:42 +02:00
Michael Dippery
b9ddd14298
docs: Correct "its" -> "it's" (#11428) 2025-04-25 09:58:01 +02:00
Roman Ostolosh
24a0369673
docs: update repository additional chunk option usage example (#11282)
* docs: update repository additional chunk option usage example

* Update docs/repository-api.md

Co-authored-by: Mike Guida <mike@mguida.com>

* Update docs/repository-api.md

Co-authored-by: Mike Guida <mike@mguida.com>

---------

Co-authored-by: Jovana Đurić <63621526+jovanadjuric@users.noreply.github.com>
Co-authored-by: Mike Guida <mike@mguida.com>
2025-04-17 22:31:07 +02:00
Pieter Wigboldus
4c8fc3a7cb
feat: add FormattedConsoleLogger (#11401)
* fix: Build ESM migrations for JS

Including jsdoc for typehinting
Add esm as an option in the migrate cli
Update the documentation for the JS migrations

Closes: #10801

* fix: Fix the migration documentation

* Cleanup the types in the migrations

* Add the formatted sql console

* Add the formatSql to the logger

* Update src/logger/FormattedConsoleLogger.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Make names in test more consistent

* Add a sub query example

* Set the language to the sql formatter

* Import SqlLanguage as a type from sql-formatter

* Remove empty console log

* Remove console log

* Add the dataSourceType

* Remove js extension from import

* Use another package to format the SQL in the logging

Same package as we use to generate the migrations

* Not need to add all the spaces in the log

* Fix the expected formatted queries

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-16 18:55:23 +02:00
Ievgen Makukh
fe71a0c3e4
perf(query-runner): use Date.now() intead of +new Date() (#10811)
* perf(query-runner): use Date.now() intead of +new Date()

* perf: use Date.now() instead of new Date().getTime()

---------

Co-authored-by: Lucian Mocanu <alumni@users.noreply.github.com>
Co-authored-by: Mike Guida <mike@mguida.com>
2025-04-15 13:18:22 -06:00
Ariel Barabas
673f06549c
refactor: define Position type for GeoJSON objects (#11259) 2025-04-15 12:53:19 -06:00
Dan Goje
56f1898c4e
fix(mongo): propagate aggregate method's generic type to its returned cursor (#10754)
Co-authored-by: Mike Guida <mike@mguida.com>
2025-04-15 12:31:29 -06:00
JackNytely
184f463ed7
chore: log descriptive errors from the Entity Listener Metadata (#11234)
* Added logging to the Entity Listener Metadata as it will throw an error (entity[this.propertyName] is not a function), which is not a descriptive error and makes it hard for users to debug their programs

* Bound the entity to the Entity Method

* Update src/metadata/EntityListenerMetadata.ts

---------

Co-authored-by: Lucian Mocanu <alumni@users.noreply.github.com>
Co-authored-by: Mike Guida <mike@mguida.com>
2025-04-15 12:19:58 -06:00
iliagrvch
046aebe696
feat: Add query timeout support for MySql (#10846)
Add "enableQueryTimeout" option to MysqlConnectionOptions. When enabled the value of "maxQueryExecutionTime" will be passed to mysql driver as query timeout.

---------

Co-authored-by: Mike Guida <mike@mguida.com>
2025-04-15 12:17:04 -06:00
Mike Guida
45577df8b7
test: remove unused type parameter from decorators (#11412)
Remove unused `type` parameter from functions supplied to decorators in tests and sample code. This resolves 477 eslint unused var warnings.

All changes are modifying functions in test or sample code of the following style:

1. `@OneToMany((type) => Entity, ...)` to `@OneToMany(() => Entity)`
2. `@ManyToOne((type) => Entity, ...)`
3. `@ManyToMany((type) => Entity, ...)`
4. `@OneToOne((type) => Entity, ...) `

Note that we don't actually ever call this function with an argument.
2025-04-14 09:25:31 -06:00
Jovana Đurić
c15cb077a7
docs(entity-subscribers): document primary key availability in UpdateEvent (#11308)
* docs(entity-subscribers): describe UpdateEvent behavior

* Update docs/listeners-and-subscribers.md

Co-authored-by: Simon Garner <simon@equalogic.com>

---------

Co-authored-by: Simon Garner <simon@equalogic.com>
2025-04-05 14:45:22 +02:00
Pieter Wigboldus
7c5ea99b31
feat: generate ESM migrations via esm flag (#10802)
Including jsdoc for typehinting
Add esm as an option in the migrate cli
Update the documentation for the JS migrations

fixes #10801

Co-authored-by: Mike Guida <mike@mguida.com>
2025-04-04 12:05:33 -06:00
Lucian Mocanu
04f3d3ff4c
chore: fix changelog generation (#11381) 2025-04-04 19:50:49 +02:00
Yevhen Komarov
6ebae3b795
feat: add new foreign key decorator, and entity schemas options (#11144)
* feat: add new foreign key decorator, and entity schemas options

This new feature adds the ability to create foreign key constraints without entity relations, using `@ForeignKey()` decorator or entity schema options.

Closes: #4569
2025-04-04 10:22:40 +13:00
dependabot[bot]
055eafd2e4
build(deps): bump tar-fs from 2.1.1 to 2.1.2 (#11370)
Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 2.1.1 to 2.1.2.
- [Commits](https://github.com/mafintosh/tar-fs/compare/v2.1.1...v2.1.2)

---
updated-dependencies:
- dependency-name: tar-fs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-03 19:37:22 +03:00
Michael Bromley
cebd63b1f4
chore: Fix publish command (#11379) 2025-04-03 11:18:32 +02:00
Michael Bromley
6c5668bd82
chore: Bump version to v0.3.22 and generate changelog (#11378) 0.3.22 2025-04-03 11:00:34 +02:00
Michael Bromley
72beb26513
chore: Add package publishing workflow (#11377) 2025-04-02 21:49:34 +02:00
Benjamin Renoux
72c6991680
fix: incorrect table alias in insert orUpdate with Postgres driver (#11082)
* fix: resolve issues in insert query orUpdate method with postgres driver

This fix make use of table name alias in WHERE clause of onUpdate method with postgres driver to avoid throwing error

Closes: #11077

* test: update insert on conflict test

---------

Co-authored-by: Lucian Mocanu <alumni@users.noreply.github.com>
2025-04-02 02:31:52 +02:00
Mike Guida
592251962d
docs: add comment explaining select version() (#11376) 2025-04-01 16:41:44 -06:00
Ruben Grimm
7b242e1698
feat: Support Expo SQLite Next
* Add ExpoDriverFactory to create ExpoLegacyDriver

* Add driver for new Expo SQLite API

---------

Co-authored-by: Ruben Grimm <pmk1c@users.noreply.github.com>
Co-authored-by: Lucian Mocanu <alumni@users.noreply.github.com>
2025-04-02 00:27:34 +03:00
Lucian Mocanu
3d79786a92
fix: version detection for Postgres derived variants (#11375) 2025-04-01 21:54:27 +02:00
Lucian Mocanu
460ef023ba
fix(sap): normalize deprecated/removed data types in SAP HANA Cloud (#11356)
* fix(sap): SAP HANA Cloud data types

* fix(sap): fall back to regular index when fulltext is not supported

* fix: remove dead code
2025-04-01 20:54:54 +02:00
Lucian Mocanu
863caf1471
fix: sql escape issues identified by CodeQL (#11338)
* fix: sql escape issues identified by CodeQL

* fix: random generation in sample code
2025-04-01 10:38:36 +02:00
zyoshoka
c3bebdcb4e
fix: remove unnecessary spaces in message when running non-fake migrations (#10809) 2025-03-31 22:27:06 -06:00
ertl
bcaa0bf071
fix: bulk insert NULL values in Oracle (#11363)
resolve issue with bulk insert of NULL values for non VARCHAR2 types in Oracle.
2025-03-31 21:35:03 -06:00
Alex Bevilacqua
a29e04750d
feat: Send DriverInfo to MongoDB client (#11214) 2025-03-31 18:57:36 +02:00
Mohamed Akram
81bb9d53e8
fix: update mongodb connection options (#11310) 2025-03-31 00:32:20 +02:00
Nicklas Laine Overgaard
03dbc7a697
fix: export QueryEvent before/after types (#10688)
* fix: export * from `subscriber/event/QueryEvent`

Otherwise it's impossible to create a listener/subscriper that is using
the Before/After query event types

* docs: clarify that QueryEvent execution time result is in ms
2025-03-30 11:31:52 +02:00
Lucian Mocanu
fb06662bea
build: setup SAP HANA tests (#11347)
* build: setup SAP HANA tests

* test: fix/skip failing SAP HANA tests

* fix(sap): rename schema
2025-03-29 22:35:44 +01:00