db: Add filter support.