pike.git / lib / modules / Sql.pmod / sql_util.pmod

version» Context lines:

pike.git/lib/modules/Sql.pmod/sql_util.pmod:153:    });    return replace(query,k,v);   }      //! Result object wrapper performing utf8 decoding of all fields.   class UnicodeWrapper (    // The wrapped result object.    protected object master_result    )   { +  inherit Sql.Result;    //! Returns the number of rows in the result.    int num_rows()    {    return master_result->num_rows();    }       //! Returns the number of fields in the result.    int num_fields()    {    return master_result->num_fields();
pike.git/lib/modules/Sql.pmod/sql_util.pmod:226:    if (!arrayp(row)) return row;    array(int|mapping(string:mixed)) field_info = fetch_fields();    foreach(row; int i; string|int val) {    if (stringp(val)) {    row[i] = utf8_to_string(val);    }    }    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()    {    return master_result->fetch_json_result();    }   }      class MySQLUnicodeWrapper   //! Result wrapper for MySQL that performs UTF-8 decoding of all   //! nonbinary fields. Useful if the result charset of the connection