pike.git / lib / modules / Cache.pmod / Storage.pmod / MySQL.pike

version» Context lines:

pike.git/lib/modules/Cache.pmod/Storage.pmod/MySQL.pike:10:   //! @note   //! An administrator is supposed to create the database and give   //! the user enough privileges to write to it. It will be care   //! of this driver to create the database tables itself.   //!   //! @thanks   //! Thanks to Francesco Chemolli <kinkie@@roxen.com> for the contribution.      #pike __REAL_VERSION__    + inherit Cache.Storage.Base; +    #define MAX_KEY_SIZE "255"   #define CREATION_QUERY "create table cache ( \   cachekey varchar(" MAX_KEY_SIZE ") not null primary key, \   atime timestamp, \   ctime timestamp, \   etime timestamp, \   cost float unsigned DEFAULT 1.0 NOT NULL, \   data longblob NOT NULL, \   dependants longblob \   )"
pike.git/lib/modules/Cache.pmod/Storage.pmod/MySQL.pike:73:    debug("lazy-decoding data");    _data=decode_value(db_data);    db_data=0;    return _data;    }   }   //does MySQL support multiple outstanding resultsets?   //we'll know now.   //Notice: this will fail miserably with Sybase, for instance.   //Notice: can and will throw exceptions if anything fails. - private object(Sql.sql_result) enum_result; + private object(Sql.Result) enum_result;   int(0..0)|string first() {    debug("first()");    if (enum_result)    destruct(enum_result);    enum_result=db->big_query("select cachekey from cache");    return next();   }      int(0..0)|string next() {    debug("next()");