change sql_state to attr_reader to avoid ruby warning