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

version» Context lines:

pike.git/lib/modules/Sql.pmod/sqlite.pike:1: -  +    #pike __REAL_VERSION__ -  + #require constant(SQLite.SQLite)    - // Cannot dump this since the #if constant(...) check below may depend - // on the presence of system libs at runtime. - constant dont_dump_program = 1; + //! Interface to SQLite3 databases.    - #if constant(SQLite.SQLite) + // Cannot dump this since the #require check may depend on the + // presence of system libs at runtime. + optional constant dont_dump_program = 1; +  + //!   inherit SQLite.SQLite;      void create(string a, void|string b, void|mixed c, void|mixed d,    void|mapping options) {    if(b) a += "/"+b;    ::create(a);   }    -  + //!   array list_fields(string n, string|void wild)   {    string qry = "";       qry = "PRAGMA table_info(" + n + ")";       array r = query(qry);    -  +  if (!r || !sizeof(r)) { +  predef::error("Unknown table: %s\n", n); +  } +     // now, we weed out the ones that don't match wild, if provided    if(wild)    {    r = filter(r, lambda(mapping row)    { return (search(row->name, wild) !=-1); }    );    }       array fields = ({});   
pike.git/lib/modules/Sql.pmod/sqlite.pike:72: Inside #if constant(SQLite.SQLite)
   }       fld->default = f->dflt_value;       fields += ({fld});    }       return fields;   }    + //!   array list_tables(string|void n)   {    string qry = "";       if(n)    qry = "SELECT name FROM SQLITE_MASTER WHERE name like '" + n + "%' and TYPE='table'";    else    qry = "SELECT name FROM SQLITE_MASTER where TYPE='table'";       array r = query(qry);
pike.git/lib/modules/Sql.pmod/sqlite.pike:93: Inside #if constant(SQLite.SQLite)
      foreach(r;;mapping row)    {    if(row->name)    out += ({row->name});    else    out += ({row["sqlite_master.name"] });    }    return out;   } -  - #else - constant this_program_does_not_exist=1; - #endif -  +