Added sql_mode parameter to the constructor