5639 Commits

Author SHA1 Message Date
Mike Guida
42913b95d7
docs: add note about using YugabyteDB to docs (#11521) 2025-06-11 13:36:23 -06:00
David Höck
86f12c9226
feat(docs): add Plausible analytics script to Docusaurus config (#11517)
* feat(docs): add Plausible analytics script to Docusaurus config

* feat(docs): conditionally include Plausible analytics script based on environment
2025-06-10 13:08:42 +02:00
David Höck
1391b5a789
chore: update workflows to ignore changes in docs directory (#11518)
* chore: update workflows to ignore changes in docs directory

Added paths-ignore configuration to CodeQL, preview, and test workflows to prevent unnecessary runs when only documentation files are modified.

* chore: remove paths-ignore for docs in preview workflow
2025-06-10 13:08:29 +02:00
Giorgio Boa
930eefd758
fix: fix up doc search workflow (#11513) 2025-06-06 18:27:10 +02:00
Naor Peled
4b0ffeeb33
docs: new website initial commit
Co-authored-by: Giorgio Boa <35845425+gioboa@users.noreply.github.com>
Co-authored-by: Jovana Đurić <63621526+jovanadjuric@users.noreply.github.com>
Co-authored-by: jovanadjuric <mat.jovana@gmail.com>
Co-authored-by: Mike Guida <mike@mguida.com>
Co-authored-by: gioboa <giorgiob.boa@gmail.com>
2025-06-06 18:03:25 +03:00
Lucian Mocanu
eb3093d03a
chore: improve linting (fixup) (#11511) 2025-06-05 22:42:27 +02:00
Lucian Mocanu
61753b1adf
chore: improve linting (#11510) 2025-06-05 21:40:45 +02:00
Giorgio Boa
65d5a00ef1
feat: add typesense/docsearch-scraper (#11424) 2025-06-05 21:06:07 +02:00
DinoDeveloper
24c3e38c51
fix: add collation update detection in PostgresDriver (#11441)
* fix(postgres): collation not updated in DB when changed in entity

Closes: #8647

* test: issue #8647

* test: add enableDrivers, combine seperated cases

* test: update test name

* test: remove unnecessary characters in test case

* style: fix formatting

* style: fix comments typo
2025-06-05 15:25:43 +02:00
KimYeonghun
413f0a68c8
fix: handle limit(0) and offset(0) correctly in SelectQueryBuilder (#11507)
* fix: handle limit(0) and offset(0) correctly in SelectQueryBuilder

- Fix JavaScript falsy value issue where limit(0) was treated as undefined
- Now limit(0) correctly generates 'LIMIT 0' SQL clause instead of being ignored
- Add helper functions hasLimit/hasOffset to distinguish between undefined and 0
- Add comprehensive test cases for zero value handling in limit/offset/take/skip
- Prevents potential security issue where limit(0) returned all records

Fixes potential data exposure when limit(0) was intended to return empty result

* fix: prettier formatting

* test: expand test coverage for LIMIT/OFFSET edge cases and regression prevention
2025-06-05 14:40:58 +02:00
Sakura
a9c16ee66d
feat: add upsert support for Oracle, SQLServer and SAP HANA (#10974) 2025-06-05 08:45:45 +02:00
Denes Antonio de Souza
07d7913be7
feat(spanner): use credentials from connection options (#11492)
* #11442

* Npm Format

* JSON Array update command Spanner - FIX

* Revert "JSON Array update command Spanner - FIX"

This reverts commit 56a28e575686dcee770b5601041b7d76e3a3a5e2.
2025-06-04 22:55:12 +02:00
Md. Minhaz Ahamed(mmarifat)
2bfa300996
fix(postgres): resolve alias or table name in upsert/insert or update conditionally (#11452)
* fix: resolve regression in upsert and orUpdate for PostgreSQL driver

This fix addresses a regression introduced in
pull request #11082 by ensuring correct handling of alias names and table names when they are equal or distinct when entities use schema

Closes: #11440

* style: code formatted

* chore: run tests by running through all the drivers

* chore: set enabledDrivers as postgres

* chore: added postgres family members as enabled drivers

* chore: accepted suggestion to remove extra comments

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

---------

Co-authored-by: Mike Guida <mike@mguida.com>
2025-06-04 22:39:38 +02:00
Simon Garner
5003aaa7c5
docs: use correct SQL statements in softDelete/restore comments (#11489) 2025-05-22 11:40:31 +12:00
Mike Guida
12a71e4581
chore: version 0.3.24 (#11478) 0.3.24 2025-05-14 12:00:37 -06:00
Alex Azartsev
d325d9e63d
fix: capacitor driver PRAGMA bug (#11467)
* fix: capacitor driver PRAGMA bug

add usage of query method for PRAGMA queries in CapacitorQueryRunner.ts;
add usage of execute method for PRAGMA queries in CapacitorDriver.ts;
PRAGMA statements must be executed with query method in CapacitorQueryRunner.ts to be able to return results used in AbstractSqliteQueryRunner, not just success indicator, otherwise error appears: tableColumn.type.indexOf is not a function.;
PRAGMA statements must be executed with execute method in CapacitorDriver.ts, otherwise error appears: prepareSQL step failed rc: 100 message: another row available

* fix: npm format
2025-05-14 14:27:50 +02:00
Simon Garner
b8dbca515e
fix(mssql): avoid mutating input parameter array values (#11476)
* test(mssql): add test for unwanted mutation of input params

* fix(mssql): avoid mutating input parameter array values

* chore: add comment explaining input array test assertion
2025-05-14 21:41:07 +12:00
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