You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Aurora Data API driver started as a clone of MysqlDriver and for DeleteQueryBuilder, it copies the number of deleted rows from result.affectedRows. But Aurora Data API driver returns this in a numberOfRecordsUpdated property, therefore affected is left undefined.
For UpdateQueryBuilder, affected is not handled at all (the driver implementation was copied before #5628 landed in master). The same fix needs to be applied there as well.
Expected Behavior
When using repository.insert(entity), the InsertResult.affected value should reflect what's being returned by the low-level API via the numberOfRecordsUpdated property.
Likewise, when using repository.update(entity), the UpdateResult.affected should do the same as insert.
Actual Behavior
In both cases, affected is undefined.
My Environment
Dependency
Version
Operating System
Windows 10
Node.js version
v12.14.0
Typescript version
v4.1.3
TypeORM version
v0.2.31
Relevant Database Driver(s)
aurora-data-api
aurora-data-api-pg
better-sqlite3
cockroachdb
cordova
expo
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?
Yes, I have the time, and I know how to start.
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.
The text was updated successfully, but these errors were encountered:
Issue Description
Aurora Data API driver started as a clone of MysqlDriver and for DeleteQueryBuilder, it copies the number of deleted rows from result.affectedRows. But Aurora Data API driver returns this in a numberOfRecordsUpdated property, therefore affected is left undefined.
For UpdateQueryBuilder, affected is not handled at all (the driver implementation was copied before #5628 landed in master). The same fix needs to be applied there as well.
Expected Behavior
When using
repository.insert(entity)
, theInsertResult.affected
value should reflect what's being returned by the low-level API via the numberOfRecordsUpdated property.Likewise, when using
repository.update(entity)
, theUpdateResult.affected
should do the same as insert.Actual Behavior
In both cases, affected is
undefined
.My Environment
Relevant Database Driver(s)
aurora-data-api
aurora-data-api-pg
better-sqlite3
cockroachdb
cordova
expo
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?
The text was updated successfully, but these errors were encountered: