SHARE
TWEET

Untitled

a guest Oct 5th, 2012 104 Never
  1. /**
  2.  * Loads a table either from our cached list, or inserts it into
  3.  * the database and adds it to our cached list
  4.  * @param options   the table options
  5.  * @param callback  callback(table or null)
  6.  */
  7. function loadTable(options, callback) {
  8.  
  9.     var key = options.key + "." + options.tablename;
  10.     var priv = false;
  11.  
  12.     if(options.tableid) {
  13.         key = options.key + "." + options.tableid;
  14.         priv = true;
  15.     }
  16.  
  17.     if(tablelist[key]) {
  18.         callback(tablelist[key]);
  19.         return;
  20.     }
  21.  
  22.     // insert or get existing
  23.     ...
RAW Paste Data
Top