Fix `rawsql()` bug for different database engine