pike.git / lib / modules / ADT.pmod / Table.pmod

version» Context lines:

pike.git/lib/modules/ADT.pmod/Table.pmod:1:   // Table.pmod by Fredrik Noring, 1998 - // $Id: Table.pmod,v 1.22 2001/10/28 17:56:38 nilsson Exp $ + // $Id: Table.pmod,v 1.23 2002/02/26 02:19:40 nilsson Exp $      #pike __REAL_VERSION__ - #define TABLE_ERR(msg) throw(({ "(Table) "+msg+"\n", backtrace() })) + #define TABLE_ERR(msg) error("(Table) "+msg+"\n")      //! ADT.Table is a generic module for manipulating tables.   //!   //! Each table contains one or several columns.   //! Each column is associated with a name, the column name.   //! Optionally, one can provide a column type. The Table module can do a number   //! of operations on a given table, like computing the sum of a column,   //! grouping, sorting etc.   //!   //! All column references are case insensitive. A column can be referred to by
pike.git/lib/modules/ADT.pmod/Table.pmod:511:    string fields = indices(t)*", ";    foreach(values(t), array row)    queries += ({ "insert into "+tablename+" ("+fields+") "    "values("+    Array.map(row, lambda(mixed x)    { return "'"+(string)x+"'"; })*", "+    ")" });    return queries;    }   }(); -  - // Huh? Experimental help.. - string help() - { -  return ("This is the experimental help system for Table.pmod.\n" -  "Table.pmod contains the following classes and objects:\n" -  "\n" -  " Table.table(array(array) table, array(string) fields, " -  "array(mapping) types)\n" -  " Table.ASCII.encode\n" -  " Table.ASCII.decode\n" -  " Table.Separated.decode\n" -  " Table.Separated.encode\n" -  " Table.SQL.decode\n" -  " Table.SQL.encode\n"); - } +