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.20 2008/06/25 11:53:31 srb Exp $ +  * $Id: sql_util.pmod,v 1.21 2008/06/28 16:36:59 nilsson 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:57:    k=map(indices(bindings),lambda(string s){    return ( (stringp(s)&&s[0]==':') ?    s : ":"+s);    });    return replace(query,k,v);   }      //! Result object wrapper performing utf8 decoding of all fields.   class UnicodeWrapper (    // The wrapped result object. -  static object master_result +  protected object master_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()
pike.git/lib/modules/Sql.pmod/sql_util.pmod:79:    return master_result->num_fields();    }       //! Returns @expr{1@} if there are no more rows in the result.    int(0..1) eof()    {    return master_result->eof();    }       //! Cached @[fetch_fields()] result. -  static array(int|mapping(string:mixed)) field_info; +  protected array(int|mapping(string:mixed)) field_info;       //! Returns Information about the fields in the result.    //!    //! The following fields are converted from UTF8 if present:    //! @mapping    //! @member string "name"    //! The name of the field. Always present.    //! @member string "table"    //! The table the field is from. Not present from all databases.    //! @member string "default"
pike.git/lib/modules/Sql.pmod/sql_util.pmod:198:    if (stringp(val) && field_info[i]->flags &&    !field_info[i]->flags->binary) {    row[i] = utf8_to_string(val);    }    }    return row;    }   }      #endif +