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

version» Context lines:

pike.git/lib/modules/Sql.pmod/sql_util.pmod:1:   /* -  * $Id: sql_util.pmod,v 1.24 2008/06/30 12:10:32 srb Exp $ +  * $Id: sql_util.pmod,v 1.25 2009/08/26 12:38:22 grubba Exp $    *    * Some SQL utility functions.    * They are kept here to avoid circular references.    *    * Henrik Grubbström 1999-07-01    */      #pike __REAL_VERSION__      //! Some SQL utility functions
pike.git/lib/modules/Sql.pmod/sql_util.pmod:134:    int|array(string) row = master_result->fetch_row();    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;    } +  +  //! JSON is always utf8 default, do nothing. +  int|string fetch_json_result() +  { +  return master_result->fetch_json_result();    } -  + }      #if constant (Mysql.mysql.HAVE_MYSQL_FIELD_CHARSETNR)      class MySQLUnicodeWrapper   //! Result wrapper for MySQL that performs UTF-8 decoding of all   //! nonbinary fields. Useful if the result charset of the connection   //! has been set to UTF-8.   //!   //! @note   //! There's normally no need to use this class directly. It's used