load an array of data into a store
@param  {Array}   data    The data to load
@param  {Function} done The callback when done
484586
function(data, done) {
      for(var i = 0; i < data.length; i++) {
        this._data.push(this._clone(data[i]));
      }
      done();
    }
514636
function setData(storage, data) {
    var core = storage.core;
    core.setItem(storage.id, JSON.stringify(data));
}
773594
protected function loadData(array $data = [])
    {
        foreach ($data as $key => $value) {
            if (property_exists($this, $key)) {
                $this->$key = $value;
            }
        }
    }
571394
function onData( data ) {
		for ( var i = 0; i < data.length; i++ ) {
			this.queue( data[ i ] );
		}
	}
84102
protected function loadFromStore()
    {
        if (false === $this->isLoaded()) {
            // Loads collection from the database on iteration.
            $models = $this->store->loadCollection($this);
            $this->setModels($models);
            $this->loaded = true;
        }
    }
46992
function done( data ) {
			var err;
			if ( data.errors ) {
				err = new Error( data.errors[ 0 ] );
				return clbk( err );
			}
			clbk( null, data.svg );
		}
953423
function (data) {
    console.log('Loading the session.');
    app.me = new Spot(data);

    if (data.sessionType === 'server') {
      app.me.connectToServer(data.address);
    } else if (data.sessionType === 'client') {
      // add data from the session file to the dataset
      data.datasets.forEach(function (d, i) {
        app.me.datasets.models[i].crossfilter.add(d.data);
        app.me.datasets.models[i].isActive = false; // we'll turn it on later
      });
      // merge all the data into the app.me.dataview
      // by toggling the active datasets back on
      data.datasets.forEach(function (d, i) {
        if (d.isActive) {
          app.me.toggleDataset(app.me.datasets.models[i]);
        }
      });
    }
    // and automatically go to the analyze page
    app.navigate('/analyze');
  }
758600
function load( available, toLoad ) {
    let loadList = available;
    if ('string' === typeof toLoad ) {
      loadList = [toLoad];
    }
    if (Array.isArray(toLoad)) {
      loadList = toLoad;
    }
    loadList.forEach(function( name ) {
      if ( available.indexOf(name) < 0 ) {
        return;
      }
      require('./'+name);
    });
  }
429280
function (callback) {
    var data = JSON.stringify(this);
    this.cloneWithoutData(function(clone) {
      clone.loadFromJSON(data, function() {
        callback && callback(clone);
      });
    });
  }
269287
function (data) {
            if (!ready) {
                return;
            }
            var i;
            if (data.all === true) {
                data.upto = numPages;
            }
            if (data.page) {
                this.queuePageToLoad(data.page - 1);
            } else if (data.upto) {
                for (i = 0; i < data.upto; ++i) {
                    this.queuePageToLoad(i);
                }
            }
        }
223170
function(data, done) {
      if(!this._key) {
        done('no key found for metadata');
        return;
      }
      var key = data[this._key.getName()];
      var ix = -1;
      for(var i = 0; i < this._data.length; i++) {
        if(this._data[i][this._key.getName()] === key) {
          ix = i;
          break;
        }
      }
      if(ix === -1) {
        this._data.push(this._clone(data));
      } else {
        this._data[ix] = this._clone(data);
      }
      done(null);
    }
1365837
function (data) {
    var self = this;

    if (typeof data === 'object') {
      data = EJSON.stringify(data);
    }

    _.each(self.callbacks['message'], function (cb) {
      cb(data);
    });
  }
1331997
function (arrays, config, onDone) {
	
	var names = [];
		
	// load array's content from DB, if any	
	SR.DB.getArray(SR.Settings.DB_NAME_SYNC,
					function (result) {
						// NOTE: if array does not exist it'll return success with an empty array
						if (result === null || result.length === 0) {
							LOG.warn('no arrays found, cannot load', 'SR.Sync');
						}
						else {
							
							var array_limit = (typeof config.limit === 'number' ? config.limit : 0);
							
							LOG.sys('arrays exist, try to load (limit: ' + array_limit + ')', 'SR.Sync');
							
							for (var i=0; i < result.length; i++) {
								var record = result[i];
														
								var arr = arrays[record.name] = [];
																
								// load data (clone is better?)
								var limit = (record.data.length > array_limit ? array_limit : record.data.length);

								var start = record.data.length - limit;
																
								for (var j=0; j < limit; j++)
									arr[j] = UTIL.clone(record.data[start+j]);
								
								// override array's default behavior
								arr.push = l_push;
	
								// store array's name
								arr._name = record.name;
								
								// store last stored index (next index to store)
								arr._index = j;
								
								LOG.sys('[' + record.name + '] DB record length: ' + record.data.length + ' start: ' + start + ' actual limit: ' + limit + ' _index: ' + arr._index, 'SR.Sync');
																
								l_names[record.name] = arr;
								names.push(record.name);
							}															
						}
						UTIL.safeCall(onDone, names);
						
					}, 
					function (result) {
						UTIL.safeCall(onDone, names);
					}, 
					{});
}
1325370
function (args, done) {
      var q = _.clone(args.q)
      var qent = args.qent
      q.limit$ = 1
      var qs = schemastm(qent)

      self.connection.all(qs.text, function (err, results) {
        if (err) {
          return done(err)
        }
        var schema = {}
        results.forEach(function (row) {
          schema[row.name] = row.type.toLowerCase()
        })

        var query = selectstm(qent, q)

        self.connection.get(query.text, query.values, function (err, row) {
          if (err) {
            return done(err)
          }
          if (row) {
            var fent = makeent(qent, row, schema)
            seneca.log.debug('load', q, fent, desc)
            return done(null, fent)
          }
          return done(null, null)
        })
      })
    }
477676
private function load(iterable $data, $item, $key, bool $flush, int &$flushCounter, int &$totalCounter): void
    {
        try {
            ($this->load)($data, $key, $this);
            $this->eventDispatcher->dispatch(new ItemEvent(EtlEvents::LOAD, $item, $key, $this));
        } catch (\Throwable $e) {
            /** @var ItemExceptionEvent $event */
            $event = $this->eventDispatcher->dispatch(new ItemExceptionEvent(EtlEvents::LOAD_EXCEPTION, $item, $key, $this, $e));
            if ($event->shouldThrowException()) {
                throw $e;
            }
            $flushCounter--;
            $totalCounter--;
        }

        if (true === $flush) {
            $this->flush($flushCounter, true);
        }
    }
1222360
public void insertData(PersistentStore store, Object[] data) {

        Row row = (Row) store.getNewCachedObject(null, data);

        store.indexRow(null, row);
        store.commitPersistence(row);
    }
163922
function(class_datas) {

		for (var i = 0, count = class_datas.length; i <count; i++) {

			this.loadClass(class_datas[i]);

		}

	}