Add filter functionality for Mysql db.