59 Commits

Author SHA1 Message Date
Lucian Mocanu
cfb3d6c015
feat(mysql): add support for vector columns on MariaDB and MySQL (#11670) 2025-11-27 15:28:49 +01:00
Artem Kustikov
2681051f78
feat(mssql): support 'vector' type for MS SQL Server (#11732) 2025-11-12 21:22:20 +01:00
Piotr Kuczynski
181154ab3c
ci: harmonize MongoDB version used in CI and local development environment and bump to v8 (#11704) 2025-10-05 20:48:10 +02:00
Naor Peled
a49f612289
feat(postgres): support vector/halfvec data types (#11437) 2025-09-18 22:12:07 +03:00
Lucian Mocanu
8b76e1af74
feat(mysql): add support for MySQL 9 / MariaDB 12 (#11575) 2025-09-17 09:08:31 +02:00
Lucian Mocanu
b1e93f736d
chore(ci): simplify workflows (#11530)
* chore(ci): reorganize workflows

* chore(ci): prevent duplicate commit validation in PRs

* code review fixes

* code review #2
2025-06-18 14:58:34 +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
Lucian Mocanu
6ba408214e
build: improve test workflow (#11361) 2025-03-26 22:10:19 +01:00
Assaf Sapir
40cc6886d5
chore: don't use version in docker-compose files (#11320) 2025-03-05 22:09:25 +02:00
Lucian Mocanu
7aa4f3c3e0 Revert "fix: nested transactions issues (#10210)"
This reverts commit 25e6ecdfd23569b4b6ba15b845b4444927386f42.
2025-03-03 15:35:05 +01:00
ertl
7e85460f10
feat: add json type support for Oracle (#10611)
* refactor: remove oracle docker tests and update DEVELOPER.md

Since oracle runs at thin mode now. Now extra docker tests are needed

* chore: increase oracle version to 21c

* feat: add json column types to oracle

* fix: try to resolve pipeline issue to increase oracle waiting time

* fix: try remove networks from oracle to fix pipeline

* fix: add container name

* fix: add missing oracledb driver in package-lock.json

* fix: corrected tests

* fix: remove tests, since only work with old oracle db

* fix: correct tests

* fix: remove deprecated types

* fix: add missing grant for materialized views

* fix: oracle-isolation.ts test

* fix: issue-3363.ts test

* fix: schema in tests
2024-01-26 10:27:28 +05:00
Dmitry Zotov
15bc8876f8
build: update CircleCI config & repair failing tests (#10590)
* updated CircleCI config

* fixed failing test

* fixed failing test

* fixed failing test

* fixed failing test

* fixed CockroachDB enum sync;
removed redundant await;
fixed failing tests;

* fixing failing tests

* fixing failing tests

* added check for empty commands

* fixed failing tests

* fixed failing tests

* fixed failing test
2024-01-03 13:32:17 +05:00
Gazy Mahomar
25e6ecdfd2
fix: nested transactions issues (#10210)
* fix: nested transactions issues

* Forgot test description

---------

Co-authored-by: Dmitry Zotov <dmzt08@gmail.com>
2024-01-02 12:03:28 +05:00
Rafi Shamim
9471bfcebc
build: update CockroachDB version to v23.1.9 (#10346)
The previous version is going out of support.
2023-09-22 18:50:52 +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
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
Umed Khudoiberdiev
8a837f9626 fixed cockroachdb version upgrade issues 2022-09-20 17:03:00 +05:00
Jacob Lauritzen
f24b26202b
feat: update db image versions in docker compose (#9367)
* feat: update db image versions in docker compose

closes #9326

* Fix postgres version

* Upgrade Docker compose versions

* Fix docker compose version
2022-09-19 18:07:58 +05:00
Dmitry Zotov
fd7ae9741e added mysql v8 to docker-compose; 2022-08-24 18:29:01 +05:00
AlexMesser
62518ae122
feat: Cloud Spanner support (#8730)
* working on Cloud Spanner driver implementation

* working on DDL synchronization

* working on DDL synchronization

* fixed failing test

* working on VIEW implementation

* fixed query parameters

* lint

* added transaction support;
added streaming support;

* fixed column types

* fixes after merge

* prettier

* added support for generated columns

* added escaping for distinct alias

* working on generated columns

* changed failing test

* updated tests for Spanner;
bugfixes;

* updated tests for Spanner;
bugfixes;

* updated tests for Spanner;
bugfixes;

* fixed failing test

* fixed failing test

* fixing failing tests

* fixing failing tests

* fixing failing tests

* added support for typeorm-generated uuid;
fixed caching;

* fixing failing tests

* fixing failing tests

* fixing failing tests

* fixing failing tests

* fixing failing tests

* fixing failing tests

* debugging failing test

* debugging failing test

* fixed bug in @PrimaryColumn decorator

* fixed failing tests

* fixed VIEW functionality;
fixed failing tests;

* updated docs
2022-04-12 17:31:57 +05:00
Umed Khudoiberdiev
3b8a031ece
0.3.0 (#8616)
* added find options and new option relationLoadStrategy

* find now returns null instead of undefined; removed primary relations support; bugfixing; added some changes and tests from next branch;

* added typename to connection options; added data loader types, lot of deprecations; new es2020 emit by tsc; new custom repositories syntax

* applied lint fixing

* replaced some instanceof checks

* reverting docker compose image versions

* optimizing imports

* reverting back some instanceof checks to prevent compiler errors

* downgrading es compilation version

* docs: remove "primary" from relation options (#8619)

remove ex-line 26 for being deprecated in 0.3.0:
"* `primary: boolean` - Indicates whether this relation's column will be a primary column or not."

* Revert "reverting back some instanceof checks to prevent compiler errors"

This reverts commit 7bf12a39e2297d097aa2a42989afd0e9e4f49bb0.

* Revert "optimizing imports"

This reverts commit 7588ac14e4f1bf1a82e3b7883134b9c2c8ae5f3f.

* Revert "replaced some instanceof checks"

This reverts commit bfa5a2d706f697ed1c1beb38b4455c0d33121e5a.

* fixing few comments

* removing transaction decorators

* this test is invalid - it's not clear why the hell getTreeRepository will throw an error and it's not clear what kind of error its going to throw

* addded mixed list support in connection options

* trying to fix oracle length issue

* lintfix

* removed shorten usages

* added named entity target support to the connection

* fixing entity target support in relation options via entity schema

* debugging oracle issue

* fixed issue with alias not being shortened in many to many alias cases

* some day we'll have a prettier.

* fixing oracle tests

* fixing oracle failing test

* removed "null" support in where expressions; fixed softDelete and restore incorrect usages

* renamed FindConditions to FindOptionsWhere

* version bump

* docs: update loading relation in find method (v 0.3.0) (#8621)

* docs: update relation definition method

Update the method that allows loading a specific relation inside the find method.
This method is found on the one-to-one-relations page.
Change `const users = await userRepository.find({ relations: ["profile"] });` to `const users = await userRepository.find({ relations: {profile: true});`.

* fix formatting

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>

* docs: change relations option definition (#8620)

* docs: change relations option definition

change line 139 from 
`const users = await connection.getRepository(User).find({ relations: ["profile", "photos", "videos"] });`
to
`const users = await connection.getRepository(User).find({ relations: { profile: true, photos: true, videos: true] });`
to reflect version 0.3.0 changes

* docs: change relations option definition

Rectified a type on line 139
from:
`const users = await connection.getRepository(User).find({ relations: { profile: true, photos: true, videos: true] });`
to
`const users = await connection.getRepository(User).find({ relations: { profile: true, photos: true, videos: true} });`

* formatting

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>

* lint

* improved find options types

* fixed types and removed nonnever because it causes circual issue for some reason

* docs: update entitymanager definition (#8623)

* docs: update entitymanager definition

change the "What is EntityManager?" page to be up-to-date with v 0.3.0

1. line 6 changes from
`You can access the entity manager via 'getManager()' or from 'Connection'.`
to 
`You can access the entity manager via DataSource's manager.`

2. the import on `getManager` in line 10 becomes `Manager` that the user have configured beforehand:
`import {getManager} from "typeorm";`
becomes 
`import {Manager} from "./config/DataSource";`

3.change entityManager definition in line 13:
from
`const entityManager = getManager(); // you can also get it via getConnection().manager`
to
`const entityManager = Manager;`

* docs: update entitymanager definition

changed line 10 from: 
`import {Manager} from "./config/DataSource";`
to
`import {DataSource} from "typeorm";`

and changed line 13 and 14 from: 
`const entityManager = Manager;`
`const user = await entityManager.findOne(User, 1);`
to 
`const myDataSource = new DataSource({ /*...*/ });`
`const user = await myDataSource.manager.findOne(User, 1);`

for a simpler way of describing the origin of DataSource and how it works.

* In return type doesn't seem to work in all cases

* feat: mssql v7 support (#8592)

Adds support for v7 of the mssql library as v6 is EOL. This also makes use of the new toReadableStream method on requests to return a native stream where required.

* fix: prefix relation id columns contained in embedded entities (#6977) (#7432)

* fix: prefix relation id columns contained in embedded entities (#6977)

Searches embedded entity columns for relation ID column if relation column
is in embedded entity. If not found, creates new relation ID with embedded
metadata set to match the relation column.

fixes: #2254
fixes: #3132
fixes: #3226
fixes: #6977

* test: prefix subcounters sub-entity with "sub" to fit in 30 character identifier for oracle

Problem introduced with #6981

* fix: find by Date object in sqlite driver (#7538)

* fix: find by Date object in sqlite driver

In sqlite, Date objects are persisted as UtcDatetimeString.
But a Date object parameter was escaped with .toISOString(), making such queries impossible.
This commit aligns both transforms.
This bug does *not* apply to better-sql where you can only bind numbers, strings, bigints, buffers,
and null.
This is breaking for when the user inserted their dates manually as ISO and relied on this old
maltransformation, after this their find()s by Date won't work anymore.

BREAKING CHANGE: Change Date serialization in selects
Closes: #2286

* add failing test

* fix: find by Date object in sqlite driver (with query builder)

Also consider query builder parameter escaping

* test: add test for 3426

Co-authored-by: James Ward <james@notjam.es>

* manually ported changes from #7796

* updated changelog

* fixes after merge

* new findOne syntax

* new find* syntax

* new find* syntax

* lint

* tsc version bump

* tsc version bump and fixed mongodb issues

* moved date fns into non dev deps

* returned oracledb dep into place

* removed lock files

* returned lock files back

* eslint upgrade

* fixing mongodb issue

* fixing mongodb issue

* test: keep junction aliases short (#8637)

Tests a fix for an issue where junction aliases (e.g. in many-to-many relations)
are not unique because they are too long and thus truncated by the driver.

Closes: #8627
Related to: 76cee41dcf1c146d02715c7f48fed33672d28c67

* fixing mongodb issues

* fixing sqlite test

* fixing sqlite test

* fixing sqlite test

* fixing mongodb test

* fixing entity schema tests

* fixing entity schema tests

* merged latest master

* removed driver instanceof checks

* removed function instanceof checks

* removed Object instanceof checks

* removing instanceof checks...

* fixing instanceof checks

* added InstanceChecker to remove remaining instanceof checks

* fixed failing test

* linting

* fixing failing test

* version bump

* compiler fixes

* Connection type usages replace to DataSource

* updated dev deps

* updated deps, add prettier, removed oracledb due to m1 issue

* chalk downgrade

* fixing failing test

* applied prettier formatting

* replaced eslint to prettier

* okay I think we can call it lint

* fixing linting

* fixed prettier introduced compiler bug

* fixed failing test

* prettier;

* fixed failing test

* alias shortening only for junction tables;
fixed failing tests;

* changed aurora db names and reverted change of junction table name shorten algorithm

* format

* removed platform from docker compose

* made numeric parameters to not use parameters to prevent parameters number limit issue. Also enabled shorten only for junction tables

* fixing test

* fixing returning columns bugs

* fixing test

* fixed returning issue

* fixing merge conflicts

* updating documentation

* working on docs / improving api

* working on docs

* fixed isConnected issue

* re-worked commands

* commenting cli command tests for now

* commenting cli command tests for now

* removed platform

* returned Connection back

* refactor: export tree repository helper methods (#8753)

* Migrated protected tree methods to util class

* Added tree repository extend override

* Ran prettier format

* merge master into 0.3.0

Co-authored-by: Bitcollage <serkan.sipahi@yahoo.de>

* working on documentation

Co-authored-by: Bilel Taktak <47742269+Parsath@users.noreply.github.com>
Co-authored-by: Salah Azzouz <52634440+Salah-Azzouz@users.noreply.github.com>
Co-authored-by: Daniel Hensby <dhensby@users.noreply.github.com>
Co-authored-by: Nebojša Cvetković <nebkat@gmail.com>
Co-authored-by: Philip Waritschlager <philip+github@waritschlager.de>
Co-authored-by: James Ward <james@notjam.es>
Co-authored-by: Felix Gohla <37421906+felix-gohla@users.noreply.github.com>
Co-authored-by: Dmitry Zotov <dmzt08@gmail.com>
Co-authored-by: Jimmy Chen <50786287+Q16solver@users.noreply.github.com>
Co-authored-by: Bitcollage <serkan.sipahi@yahoo.de>
2022-03-17 21:01:45 +05:00
Nix
7facbabd26
feat: allow {delete,insert}().returning() on MariaDB (#8673)
* feat: allow `returning()` on MariaDB >= 10.5.0

Closes: #7235

* build: update docker mariadb version to 10.5.13

* fix: MySqlDriver behavior returning is supported

* feat: what kind of DML returning is supported

* test: imporve test #7235
2022-02-21 18:21:14 +05:00
Nils Bergmann
91080be0cd
feat: implement generated columns for postgres 12 driver (#6469)
* feat: implement generated columns for postgres 12 driver

The implementation has the potential to make full text search much faster when using postgres. You can simply pre-generate all tsvector's

* test: add tests for generated columns in postgres 12

* docs: document generated columns for postgres 12

* fix: check postgres version for generated columns

Generated columns are only available on postgres version 12+

* test: add postgres 12 to tests

Currently, there are only tests for postgres 9. This adds postgres 12 as test target

* test: remove generated column from model

MariaDB will fail with a generated column type

* test: use non alpine container for postgres 12

* test: skip generated columns test on mariadb

* fix: detect generated column change

* fix: circle ci postgres version

* fix: add replication mode to isGeneratedColumnsSupported() function

Latest changes in master introduce replication mode. This commit adjust the the pull request #6469 to this change

* fix: ci testing for postgres 12

Latest changes in master broke the postgres 12 test setup

* style: remove SqlServerConnectionOptions generic parameter for createTypeormGeneratedMetadataTable function

imnotjames notice this in his review of the pull request

* style: remove unnecessary return of Promise.resolve()
This return of Promise.resolve() has no effect. We can leave it out

* style: fix whitespace issue for config.yml

* refactor: use VersionUtils

Instead of parsing the version string with parseFloat, use the typeorm VersionUtils

* fix: fix failing build

After merging the upstream into the pr fork, the build stopped working. The reason why the build fails, is because in the upstream one import is missing and one variable was removed

* refactor: replace promise.all() with for loop

* refactor: make requested changes

* fix: update table name

* fix: server version query and escape table column in queries

* code refactoring

* fixed lint issue

* removed "enabledDrivers" from test

Co-authored-by: Dmitry Zotov <dmzt08@gmail.com>
2021-11-14 18:02:35 +05:00
MG
4aaafdffe2
build: local development with oracle (#7881) 2021-11-09 14:00:14 +05:00
James Ward
449bad5ae4
chore: use cockroachdb v21 in tests (#7764) 2021-06-19 10:05:22 -04:00
James Ward
fa21f874a5
build: add oracle to CI (#6623)
* build: add oracle to build database services

* only enable test 1972 for MySQL

* disable github issue 3118 for oracle
2020-09-05 04:20:54 +05:00
James Ward
10d0aea9c0
chore: pin version of cockroach to a known good version (#6585) 2020-08-19 22:15:18 +05:00
Kononnable
2d3ad50220 chore: MSSQL, Cockroachdb, Oracle tests on CI (#5293)
* enable cockroachdb, oracle builds on CircleCI
update mssql version

* make oracle tests work again (based on #4314)

* fix Oracle - repository > find options > locking

* proper hydralization of cockroach integer types

* linting
2020-01-22 12:06:05 +05:00
Umed Khudoiberdiev
ec9034125d
feat: SAP Hana support (#5246)
* basic impl

* finished basic table metadata queries;

* implemented data types;

* working on data types;

* added test for column length;

* working on indices

* working on query runner

* working on schema builder

* removed SAP HANA client from dependencies

* fixed SAP uuid

* working on falling tests;

* working on falling tests;

* added docker configuration for sap hana

* simplifying sample entity

* implemented pool;

* trying to add SAP Hana to Circle CI

* trying to add SAP Hana to Circle CI

* trying to add SAP Hana to Circle CI

* testing CircleCI config

* testing CircleCI config

* added sap tests for ci

* changed sap port

* ci experiments

* ci experiments

* removing ci, adding docs

* removing ci

* minor fixes;

* fixed falling test;

Co-authored-by: AlexMesser <dmzt08@gmail.com>
2019-12-23 19:35:54 +05:00
Jerko Steiner
c30b4859d4 fix: check for version of MariaDB before extracting COLUMN_DEFAULT (#4783)
Added VersionUtils module to make it easier to compare coerce and
compare versions of MariaDB database.

See https://mariadb.com/kb/en/library/information-schema-columns-table/

Relevant excerpt for `COLUMN_DEFAULT`:

> Default value for the column. From MariaDB 10.2.7, literals are quoted
> to distinguish them from expressions. NULL means that the column has no
> default. In MariaDB 10.2.6 and earlier, no quotes were used for any type
> of default and NULL can either mean that there is no default, or that
> the default column value is NULL.
2019-10-18 16:26:16 +05:00
Zotov Dmitry
c63c31e7dc updated on docs;
minor fix in oracle;
updated crdb version in docker;
2019-04-09 18:45:13 +05:00
Zotov Dmitry
0895d9456d working on falling test; 2019-03-15 18:35:58 +05:00
Zotov Dmitry
8091bad522 working on falling test; 2019-03-15 18:23:13 +05:00
Zotov Dmitry
2bbb72f61f working on circle CI config;
updated mysql version;
2019-03-15 18:15:33 +05:00
Zotov Dmitry
1d8df5ebf3 working on falling test;
updated mysql version;
2019-03-15 17:53:50 +05:00
Zotov Dmitry
a6725ed6c9 working on falling test; 2019-03-15 17:40:51 +05:00
Zotov Dmitry
ee9ba99f74 enabled skipped tests;
fixed tests to pass on crdb `master`;
2019-03-13 19:46:39 +05:00
Zotov Dmitry
f32a82d4a5 added rowid generation strategy option in column options; 2019-02-25 21:29:01 +05:00
Zotov Dmitry
ccbfaba817 configuring testing environment; 2019-02-08 18:58:17 +05:00
Zotov Dmitry
d28f74c1ad added testing configuration;
working on tests;
2019-02-08 18:43:50 +05:00
Umed Khudoiberdiev
8f13ffa333 fixing circleci 2019-01-03 22:10:59 +05:00
Umed Khudoiberdiev
7f6aeeb381 fixing circleci config 2019-01-03 21:55:27 +05:00
jskim
bc78630770 Update docker-compose.yml
- mssql official image is changed. [Link](https://hub.docker.com/r/microsoft/mssql-server/)
2018-11-06 23:07:12 +09:00
Seth Fitzsimmons
7893c66a36 Explanation of / apology for mdillon/postgis 2018-07-02 12:08:29 -07:00
Seth Fitzsimmons
1e20c6b04a Spatial support for PostgreSQL using PostGIS
This includes support for both geometry and geography columns as well as
GiST indices (used when passing the `spatial: true`). Client
representations use GeoJSON (existing MySQL and MS SQL drivers use WKT
(well-known text)) for compatibility with geospatial libraries such as
Turf, JSTS, etc.
2018-06-28 06:59:13 -07:00
Zotov Dmitry
c47cf7ecbd added test for #1388 2018-03-31 11:56:57 +05:00
Zotov Dmitry
bbaf1abdf4 working on SqlServer spatial types; 2018-03-29 20:39:41 +05:00
Zotov Dmitry
5abe3579a7 changed docker-compose mysql version to 5.5 2018-03-29 17:14:44 +05:00
Umed Khudoiberdiev
5b9b51bd2e updated mssql docker image 2017-10-03 15:52:48 +05:00
Umed Khudoiberdiev
fb87751156 added init and version commands 2017-09-13 21:40:34 +05:00