Branch: Tag:

2018-01-15

2018-01-15 11:07:07 by Martin Karlgren <marty@roxen.com>

Sql.sql_util.UnicodeWrapper: Inherit Sql.Result.

This avoids code duplication for fetch_row_array() and enables the
iterator API to work correctly.

160:    protected object master_result    )   { +  inherit Sql.Result;    //! Returns the number of rows in the result.    int num_rows()    {
233:    return row;    }    -  //! @returns -  //! Multiple result rows at a time (at least one). -  //! -  //! On EOF it returns @expr{0@}. -  array(array(string)) fetch_row_array() -  { -  array row, ret = ({}); -  while (row = fetch_row()) -  ret += ({row}); -  return sizeof(ret) && ret; -  } -  +     //! JSON is always utf8 default, do nothing.    int|string fetch_json_result()    {