TortugaResearch / Tortuga.Chain

A fluent ORM for .NET
Other
335 stars 22 forks source link

Command Timeout is not being honored in PostgreSQL and MySQL #490

Closed Grauenwolf closed 2 years ago

Grauenwolf commented 2 years ago

The code that allows for overriding the command timeout was not being executed for PostgreSQL and MySQL.

At one point we switched to using ExecutionToken.PopulateCommand to set the parameters for a command. At first glance, this looks like just a code deduplication effort. But it also calls OnBuildCommand(command) and RaiseCommandBuilt(command);. This event pipeline allow appenders such as TimeoutAppender to modify the command.

Since PostgreSQL and MySQL were manually populating the command instead of calling ExecutionToken.PopulateCommand, they were not participating in the above mentioned event pipeline.