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

version» Context lines:

pike.git/lib/modules/Sql.pmod/sybase.pike:1:   /*    * Sybase driver for the Pike programming language.    * By Francesco Chemolli <kinkie@roxen.com> 10/12/1999 -  * (C) Roxen IS +     * -  * $Id: sybase.pike,v 1.5 2000/09/28 03:39:10 hubbe Exp $ -  * +     */      #pike __REAL_VERSION__ -  + #require constant(sybase.sybase)    - #if constant(sybase.sybase) + // Cannot dump this since the #require check may depend on the + // presence of system libs at runtime. + constant dont_dump_program = 1;      inherit sybase.sybase:mo;   #define THROW(X) throw(({X+"\n",backtrace()}))         /*    * Deprecated. Use connect(host,db,user,pass) instead.    */ - void select_db(string db) + __deprecated__ void select_db(string db)   {    mo::big_query("use "+db);   }      /*    * Deprecated. Use an SQL command instead.    */ - void create_db (string dbname) { + __deprecated__ void create_db (string dbname) {    mo::big_query("create database "+dbname);   }      /*    * Deprecated. Use an SQL command instead.    */ - void drop_db (string dbname) { + __deprecated__ void drop_db (string dbname) {    mo::big_query("drop database "+dbname);   }      void shutdown() {    catch { //there _will_ be an error. It's just that we don't care about it.    mo::big_query("shutdown");    };   }      string server_info () {
pike.git/lib/modules/Sql.pmod/sybase.pike:85:    if (skipthismany<0)    THROW("Negative skips are not supported");    if (!skipthismany)    return;    while (skipthismany && fetch_row()){    skipthismany--;    }   }      void create(void|string host, void|string db, void|string user, -  void|string pass) { -  mo::create(host||"",db||"",user||"",pass||""); +  void|string _pass, void|mapping options) { +  string pass = _pass; +  _pass = "CENSORED"; +  mo::create(host||"",db||"",user||"",pass||"",options);    if (db && stringp(db) && sizeof(db)) {    mo::big_query("use "+db);    }   }      int|object big_query(string q, mapping(string|int:mixed)|void bindings) {    if (!bindings)    return ::big_query(q); -  return ::big_query(.sql_util.emulate_bindings(q,bindings,this_object())); +  return ::big_query(.sql_util.emulate_bindings(q,bindings,this));   } -  - #else - #error "Sybase driver not available.\n" - #endif +