788 Commits

Author SHA1 Message Date
Steve Foster
d76b546929
docs: update redis cache client options (#10521)
Between v3 and v4 in node-redis the client options changed for a collection of socket related
paramaters. In the caching documentation the v3 format for used for `host` and `socket`. When
following the documented example the redis client would default to `localhost` even when a
different value for `host` was specified.

Closes: #9987
2023-12-29 15:03:02 +05:00
seungwonleee
4173e51dd8
docs: update delete-query-builder.md (#10519)
For previous examples typescript error occurs in createQueryBuilder that says “Argument of type 'string' is not assignable to parameter of type 'QueryRunner'.ts(2345)”.
If you check the type of createQueryBuilder, the string cannot come as the first argument.
The types of createQueryBuilder are as follows.
myDataSource.createQueryBuilder<ObjectLiteral>(entityClass: EntityTarget<ObjectLiteral>, alias: string, queryRunner?: QueryRunner | undefined):
2023-12-29 14:52:03 +05:00
Gabriel Kim
b240d87f34
feat: custom STI discriminator value for EntitySchema (#10508)
add discriminator value metadata to EntitySchema

Closes: #10494
2023-12-29 14:43:59 +05:00
seungwonleee
c8ec5429eb
docs: update select-query-builder.md (#10520)
To use alias as the first argument in the createQueryBuilder method, the entity must be imported into the getRepository method to be used.
2023-12-29 13:11:16 +05:00
Corey Shupe
ebd61d1440
feat: expose countDocuments in mongodb (#10314) 2023-09-30 15:09:58 +05:00
Akshay Barad
b8af97a31d
docs: update example-with-express.md (#10374) 2023-09-30 14:48:08 +05:00
Erik McKelvey
8d0e7f98c3
docs: fix naming consistency (#10383) 2023-09-30 14:44:38 +05:00
Mohammad Rayyan
35a3a7f049
docs: added missing import in select-query-builder.md (#10385)
The example for the deleteAt was missing from the import in example of soft delete
2023-09-30 14:44:06 +05:00
Mohammad Rayyan
6378b21119
docs: update select-query-builder.md (#10297)
In the line 315 there was a mistake due to which the technical sense of the sentence was lost. I corrected the typo.
2023-09-02 14:49:44 +05:00
Raphael Pinto
e72a9da30e
docs: add the some options on Oracle documentation (#10182)
This commit adds the options serviceName and sid on
data-source-options documentation.

Related to #10181
2023-08-19 17:29:17 +05:00
richardvinc
e36aa6ccc3
docs: typo on given example (#10166)
fix typo on given example. it should log `entity`, instead of `post`
2023-08-19 17:27:17 +05:00
Murali
8740adbe9e
docs: update usage of query runner with query builder (#10093)
Co-authored-by: Murali <murali.kambhampati@agxworld.com>
2023-08-19 17:20:37 +05:00
Cody Tseng
ff6e8751d9
docs: change implements to extends (#10219) 2023-07-22 12:52:43 +05:00
AlexMesser
607d6f9595
fix: added transaction retry logic in cockroachdb (#10032)
* added transaction retry logic in cockroachdb

* added option to control max transaction retries;
added delay before transaction retry;
updated docs;

* fixes in retry logic

* enable storing queries after retrying transaction
2023-05-09 23:46:07 +05:00
Joe Rybarczyk
03058055df
fix: add trustServerCertificate option to SqlServerConnectionOptions (#9985)
* fix: add missing 'trustServerCertificate' option to SqlServerConnectionOptions interface

Closes: #8093

* docs: add `trustServerCertificate` description to mssql data source options docs

* fix: consistency between jsdoc and docs

---------

Co-authored-by: jrybarczyk <jrybarczyk@exclusiveresorts.com>
2023-05-09 15:31:27 +05:00
smith-xyz
d8a2e3730f
feat: mariadb uuid inet4 inet6 column data type support (#9845)
* feat: mariadb inet4, inet6, uuid data type support

* refactor: cleanup unnecessary methods

* style: mysqldriver formatting

* fix: handle length column metadata mariadb uuid

* fix: 8832 test suite to verify errors correctly

* style: fix 8832 test formatting

* fix: 8832 error testing cleanup

* fix: remove defaulting column type feature

* style: fix formatting

* fix: remove unnecessary dbms error test

* fix: remove unused import in test

* fix: ensure defaulting uuid generation column type
2023-04-25 11:36:20 +05:00
Jo YoHan
b06404962b
docs: update entity-manager-api.md (#9956)
typo:
const timber = await manager.findOne(User, { firstName: "Timber" })   →   const timber = await manager.findOneBy(User, { firstName: "Timber" })

Co-authored-by: Jo YoHan <37216082+oxyrinchus@users.noreply.github.com>
2023-04-18 12:07:10 +05:00
Alexis Fournier
e0165e75ee
fix: add directConnection options to MongoDB connection (#9955)
Co-authored-by: afournier <afournier@solocal.com>
2023-04-17 21:03:00 +05:00
Ezekiel Adetoro
68aa573262
docs: issue #8860 (#9951)
* fixed: issue #8860

* example looks rough

---------

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
2023-04-15 18:29:15 +05:00
mptr
f6a3ce732d
feat: support for the latest mongodb v5 (#9925)
* fix: add support for mongodb driver v5

This new fix allow support to mongodb driver v5

Closes: #7907

* refactor: remove callback from MongoDriver connect

* fix: check for propertyName in transform

* fix: add support for mongodb driver v5

This new fix allow support to mongodb driver v5

Closes: #7907

* feat: mongodb 5.2.0 typings

* fix: instanceof ObjectId check

Instanceof check now no longer references to just the
type but the loaded class ref instead.

* test: fix test name to mongodb v5

---------

Co-authored-by: Matheus Melo Antiquera <matheusantiquera@finchsolucoes.com.br>
Co-authored-by: tgrassl <grassl.timon@gmail.com>
Co-authored-by: Matheus Melo Antiquera <matheus.melo.a@hotmail.com>
2023-04-15 13:30:01 +05:00
Umed Khudoiberdiev
7dac12c2b1
fix: drop xml & yml connection option support (#9930) 2023-04-09 11:30:28 +05:00
Gabriel Kim
bc306fb5a2
feat: add support for STI on EntitySchema (#9834)
* feat: add support for STI on EntitySchema

Closes: #9833

* fix: run prettier

---------

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
2023-04-06 12:23:45 +05:00
Alexander Kraev
97280fc825
docs: update migrations docs (#9828) 2023-04-06 11:59:35 +05:00
JT Smith
98f22052be
docs: added a documentation section on debugging query builder (#9846)
* Added a section on debugging query builder

It covers using getQuery() and getQueryAndParameters() which are both useful when trying to figure out why your query isn't doing what you might expect it should do.

* forgot await

* fix typo
2023-04-05 15:55:10 +05:00
Peter Hostačný
e0e7d2c125
docs: update many-to-many-relations.md (#9861)
Fixing typescript code.
2023-04-05 15:51:10 +05:00
Ihor Levchenko
3f1142b5de
docs: update relations-faq (#9879)
Proposed a better safe-type workaround for circular dependencies.
2023-04-05 15:46:58 +05:00
JT Smith
f7b210bedb
docs: documented getCount() method (#9847)
* documented getCount()

getCount() is currently only mentioned in the documentation once, and you're never shown how to use it. This patch adds a little documentation for getCount()

* clarification
2023-04-05 15:42:30 +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
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
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
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
Zeeshan Haider Khan
c669f50bdd
docs: update many-to-many-relations.md (#9736) 2023-01-28 21:00:14 +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
JesseNeon
ae91c050a4
docs: correct typo (#9643) 2022-12-27 14:09:52 +05:00
r-shirasu
648222a006
docs: correct typo (#9655) 2022-12-27 14:08:30 +05:00
Saad A. Bazaz
82518125e4
docs: fix missing ) (#9629) 2022-12-16 20:50:31 +05:00
Tim Beyer
6ba48bdc1b
feat: allow per-migration control over transaction behavior (#9459)
Closes #7087
2022-12-03 21:35:41 +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
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
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
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
kz-d
6e9151323a
docs: update "migrate:show error code" description (#9476) 2022-12-03 19:41:23 +05:00
Charlély Delgrange
3b64b1a2e0
docs: Improve comprehension of update repository API (#9417)
* Improve comprehension of update repository API

Because the previous doc example was `await repository.update({ firstName: "Timber" }, { firstName: "Rizzrak" })`, I got confused and reversed the **WHERE** condition and the actual **change**.

This change is just a suggestion to avoid that kind of confusion

* Apply the same doc suggestion change to the entity manager update API
2022-12-03 19:33:19 +05:00
Gonzalo Rodulfo Martínez
1cb738a701
feat: index support for materialized views of PostgreSQL (#9414)
* feat: Added new indices attribute to View

* feat: Added view indices methods

Such as dropViewIndex, addViewIndices, addViewIndex

Added "View" type in some parameters of methods

* feat: Added view indices support when creating new indices and dropping old indices

* ref: Renamed "table" to "view" in log when dropping view index

* feat: changed order of schema sync operations

To create a new view index, a view has to be created first.

* feat: removed unreachable code

A view object don't have its indices when creation. The indices are added to the view through the createViewIndex method.

* feat: Added view when returning TableIndex

* feat: Added view paths as argument in getViews on log method

* feat: Created createViewIndexSql

This method reuses code from createIndexSql, but eliminates the isSpatial part, because a viewColumn doesn't support this attribute.

* fix: Added missing columns const to createViewIndexSql

* feat: Removed isSpatial attribute when returning TableIndex

* feat: Added unit tests

* fix: Dropped current index to leave unique index on indices array

There was a bug that when asserting the unique index, it would compare with the previous index, even when explicitly selecting the unique index in the indices array.

* ref: lint files

* feat: added "postgres" in enabledDrivers attribute

This is to enable only PostgreSQL for the tests

* feat: added doc for materialized view indices

* ref: lint files

* feat: Added new method to create mat. view indices

This new method goes after creating the views. Aditionally, the views are now created at the end (as it was before)

* ref: prettify files

* feat: revamped tests

Replaced previous unit tests with more significant ones
2022-12-03 19:25:50 +05:00
Charlton Austin
d71e9c4394
docs: add in an example for 4526 (#9538)
* docs: add in an example for 4526

* small fixes

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
2022-12-03 17:31:32 +05:00
Bikram Suwal
975a953995
docs: general grammer (#9574) 2022-12-03 16:54:29 +05:00
smile1sky
f606a22999
docs: improve zh docs (#9575) 2022-12-03 16:53:21 +05:00
lucas
5253c8f5a6
docs: add examples in soft delete doc (#9402) 2022-11-04 16:27:13 +05:00
Warwick
66acec8c0c
docs: update one-to-one-relations.md (#9456)
One to one documentation is referring to the wrong entity
2022-11-04 15:58:14 +05:00