Adds a query to DBInterface.