Closed lielran closed 2 years ago
Unfortunately we cannot change the API of the driver like that.
I think we can make it a connection/driver option. So that specific connection will run all the queries with the continueAfterTimeout
flag set and if you don't want to run it like that you would create a different connection. Thoughts?
what is the reason that this API can't be changed in that way?
since the API of the data API support continueAfterTimeout
by query and not by "connection"(not a real thing in aurora serverless, right?) I think we should support that on the query level (with a smart default of false).
the second point is about the failing tests, how can I debug them?
This driver is not a standalone project. Please see here how it's used in the TypeORM project: https://github.com/typeorm/typeorm/blob/60a6c5d9607e06bfb2ff842d733ff90ce8b279ea/src/driver/aurora-data-api/AuroraDataApiQueryRunner.ts#L154
If we merge this PR it will break the driver because TypeORM will still send parameters of the query as a second parameter. If we do the change on the TypeORM side to accept continueAfterTimeout
and proxy it for the driver it will still not work on all the quries, as this method is used for entity operations as well (e.g. calling save
on the repository).
Please make it a driver option instead, this is very useful. Each and every query generated with this connection should have continueAfterTimeout
set to true. The development of upstream typeorm
is in a grinding halt, poking out a query level option seems impossible in the foreseeable future.
closes https://github.com/ArsenyYankovsky/typeorm-aurora-data-api-driver/issues/82 expose param for
continueAfterTimeout
on a query level