Skip to content

Added a method in DBConnection that generates the SQL to compute the number of seconds between two timestamps

Marek Szuba requested to merge experimental/timestamp_interval_sql into master

Created by: muffato

I would like to use this method in some new adaptor methods I'm writing, and thought it'd be clearer to submit it separately. Even without considering the new code, it actually simplifies the existing adaptors.

The reason for this is that each database driver has its own way of computing the difference between two timestamps. The current adaptors all implement the same switch-case to select the appropriate syntax. This is what I've move to DBConnection.

Merge request reports