#55769Centralize DB queries in DatabaseConnection class
Description
In order to be able to easier debug stuff and intercept database calls, all queries should be made through a central query() method in DatabaseConnection. Currently, all query methods call link->query themselves, making it hard to intercept or benchmark these calls.