new filtering options: where clause in sql, and preprocessrecord