Move QueryInterface out of Database repository into new Query repository