ORM for TypeScript and JavaScript. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.
All three config options above produce the same result, which is an ioredis query cache connected to myhost on port 1234, database index 1
Actual Behavior
Option 1 succeeds.
Option 2 ignores port and only uses the values inside the options block, using the ioredis default port 6379. Connection fails.
Option 3 ignores port and attempts to connect to localhost:6379, and fails.
Steps to Reproduce
Try each of the listed cache configs in your ormconfig.js
My Environment
Dependency
Version
Operating System
Node.js version
v14.16.1
Typescript version
v3.9.9
TypeORM version
v0.2.32
ioredis version
v4.27.2
Additional Context
Relevant Database Driver(s)
[ ] aurora-data-api
[ ] aurora-data-api-pg
[ ] better-sqlite3
[ ] cockroachdb
[ ] cordova
[ ] expo
[x] ioredis
[ ] mongodb
[ ] mysql
[ ] nativescript
[ ] oracle
[ ] postgres
[ ] react-native
[ ] sap
[ ] sqlite
[ ] sqlite-abstract
[ ] sqljs
[ ] sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
I've made a fix & tested locally. Just need guidance with the pull request.
[ ] Yes, I have the time, and I know how to start.
[x] Yes, I have the time, but I don't know how to start. I would need guidance.
[ ] No, I don't have the time, although I believe I could do it if I had the time...
[ ] No, I don't have the time and I wouldn't even know how to start.
Issue Description
According to the ioredis docs, the following connection options are equivalent within the
cache {}
block:1.
2.
3.
Expected Behavior
All three config options above produce the same result, which is an ioredis query cache connected to
myhost
on port1234
, database index1
Actual Behavior
Option 1 succeeds. Option 2 ignores
port
and only uses the values inside theoptions
block, using the ioredis default port 6379. Connection fails. Option 3 ignoresport
and attempts to connect tolocalhost:6379
, and fails.Steps to Reproduce
Try each of the listed cache configs in your
ormconfig.js
My Environment
Additional Context
Relevant Database Driver(s)
aurora-data-api
aurora-data-api-pg
better-sqlite3
cockroachdb
cordova
expo
ioredis
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
I've made a fix & tested locally. Just need guidance with the pull request.