* 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>
* 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>
* 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
* 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
* 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
* feat: implement new calculated decorator
This new feature change bahviour of typeorm to allow use new calculated decorator
Closes#9323
* feat: implement new virtual decorator
This new feature change bahviour of typeorm to allow use new virtual decorator
Closes typeorm#9323
* feat: Implement new virtual decorator
This new feature change bahviour of typeorm to allow use new virtual decorator
Closes typeorm#9323
* feat: implement new virtual decorator
This new feature change bahviour of typeorm to allow use new calculated decorator
Closes typeorm#9323
* feat: implement new virtual decorator
This new feature change behavior of typeorm to allow use of the new virtual column decorator
Closes typeorm#9323
* updated implementation, using "disable" keyword
* rebase test restructure
* rebase orphanedRowAction tests with keyword "disabled"
* rename test suite files to reflect changed naming: skip -> disable
Simplify test suite to comply with postgres12
* Update tests to reflect 0.3 breaking changes
* prettied
Co-authored-by: Jannik <jannik@jannikmewes.de>
* feat: add fake migrations running and reverting
Added a cli option to fake-run or fake-revert a migration, adding to the
executed migrations table, but not actually running it. This feature is
useful for when migrations are added after the fact or for
interoperability between applications which are desired to each keep
a consistent migration history
Closes: #6195
* changed enabled drivers in test
* added docs to the property
* fixed lint issue
Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
Co-authored-by: Dmitry Zotov <dmzt08@gmail.com>
Previously, the documentation said that it's using the `findOne`
function, but it used the `findBy` and `findOneBy` functions. In order
to be coherent, this commit changes all those to `findOneBy`.
* feat: add nativeBinding option to better-sqlite3 driver
better-sqlite3 allows to set the `nativeBinding` option since version v7.5.0. It allows to define a custom path for the native api binary `better_sqlite3.node`. This feature is very important for developers who want to create binaries of their node apps for different platforms (e.g. with pkg). [More information](https://github.com/WiseLibs/better-sqlite3/blob/master/docs/api.md#new-databasepath-options=).
* docs: add description about nativeBinding option for better-sqlite3 driver
* refactor: apply prettier, test if nativeBinding is correctly set to better-sqlite3 driver
* refactor: apply prettier
* refactor: replaced describe.only() with describe()
* feat: add constraintName to JoinColumn
Add a constraintName to JoinColumn decorators to allow specifying foreignKey name.
Use constraintName when building JoinTable entities as well.
Partially solves: #1355
* test: add tests for constraintNames on JoinColumn
* docs: add constraintName documentation to JoinColumn and JoinTable
* test: update snapshot in 5444 test
Add constraintName property with correct variable undefined to snapshot in tests for issue 5444.
* prettier
* added support for custom FK name in Sqlite;
added test;
* removed .only
* fixed FK constraint renaming on table/column rename
* minor fix
* fixed @Unique and @Index constraints renaming on table/column rename
* working on constraint name support for PK
* replaced `constraintName` with `primaryKeyConstraintName` and `foreignKeyConstraintName`
* fixed failing test
* working on constraint name support for PK
* updated docs
Co-authored-by: Matthijs Hatzmann <matthijs.hatzmann@tradecast.eu>