Reloads the database list.
        Because loading a database triggers the loading of all collections and graphs within,
        only handles are loaded when this function is called. The full databases are loaded on demand when accessed
326426
def reload(self) :
        

        r = self.session.get(self.databasesURL)

        data = r.json()
        if r.status_code == 200 and not data["error"] :
            self.databases = {}
            for dbName in data["result"] :
                if dbName not in self.databases :
                    self.databases[dbName] = DBHandle(self, dbName)
        else :
            raise ConnectionError(data["errorMessage"], self.databasesURL, r.status_code, r.content)
625290
function databaseInitialize() {
  // on the first load of (non-existent database), we will have no collections so we can 
  //   detect the absence of our collections and add (and configure) them now.
  var entries = db.getCollection("entries");
  if (entries === null) {
    entries = db.addCollection("entries");
  }

  // kick off any program logic or start listening to external events
  runProgramLogic();
}
1357597
public void loadDatabase() throws Exception {
        // create/start the requested number of threads
        int thread_count = 10;
        Thread[] loginThreads = new Thread[thread_count];
        for (int i = 0; i < thread_count; ++i) {
            loginThreads[i] = new Thread(new LoginThread());
            loginThreads[i].start();
        }

        // Initialize the statistics
        fullStatsContext.fetchAndResetBaseline();

        // Run the data loading for 10 seconds
        System.out.println("\nLoading database...");
        Thread.sleep(1000l * 10);

        // stop the threads
        loadComplete.set(true);

        // block until all outstanding txns return
        client.drain();

        // join on the threads
        for (Thread t : loginThreads) {
            t.join();
        }

        // print the summary statistics of the data load
        printResults();

        // Create entries that we can query on.
        createUniqueData();
    }
942742
function (database, callback) {
        var s = this,
            querier = s._querier;
        querier.connect();
        async.waterfall([
            function (callback) {
                querier.showTables(database, function (err, tables) {
                    callback(err, tables);
                });
            },
            function (tables, callback) {
                var tableNames = s._parseTableNames(tables);
                async.map(tableNames, function (table, callback) {
                    querier.descTable(database, table, function (err, data1) {
                        querier.selectKeyColumnUsage(database, table, function (err, data2) {
                            callback(err, {
                                name: table,
                                columns: s._parseTableData(data1),
                                relations: s._getRelations(data2, table)
                            });
                        });
                    });
                }, callback);
            },
            function (data, callback) {
                var database = {};
                data.forEach(function (data) {
                    database[data.name] = data;
                });
                callback(null, database);
            }
        ], function (err, result) {
            querier.disconnect();
            callback(err, result);
        });
        return s;
    }
1286800
public synchronized void refreshList() {

        if (getList() == null) {
            return;
        }
        if (LOG.isDebugEnabled()) {
            LOG.debug(Messages.get().getBundle().key(Messages.LOG_START_REFRESH_LIST_1, getListId()));
        }
        m_listState = getList().getState();
        getList().clear();
        fillList();
        getList().setState(m_listState);
        m_listState = null;
        listSave();
        if (LOG.isDebugEnabled()) {
            LOG.debug(Messages.get().getBundle().key(Messages.LOG_END_REFRESH_LIST_1, getListId()));
        }
    }
446651
@Override
  public void initialize() {
    if(databaseConnection == null) {
      return; // Supposedly we initialized already.
    }
    if(LOG.isDebugging()) {
      LOG.debugFine("Loading data from database connection.");
    }
    MultipleObjectsBundle bundle = databaseConnection.loadData();
    // Run at most once.
    databaseConnection = null;

    // Find DBIDs for bundle
    {
      DBIDs bids = bundle.getDBIDs();
      if(bids instanceof ArrayStaticDBIDs) {
        this.ids = (ArrayStaticDBIDs) bids;
      }
      else if(bids == null) {
        this.ids = DBIDUtil.generateStaticDBIDRange(bundle.dataLength());
      }
      else {
        this.ids = (ArrayStaticDBIDs) DBIDUtil.makeUnmodifiable(DBIDUtil.ensureArray(bids));
      }
    }
    // Replace id representation (it would be nicer if we would not need
    // DBIDView at all)
    this.idrep = new DBIDView(this.ids);
    relations.add(this.idrep);
    getHierarchy().add(this, idrep);

    DBIDArrayIter it = this.ids.iter();

    int numrel = bundle.metaLength();
    for(int i = 0; i < numrel; i++) {
      SimpleTypeInformation<?> meta = bundle.meta(i);
      @SuppressWarnings("unchecked")
      SimpleTypeInformation<Object> ometa = (SimpleTypeInformation<Object>) meta;
      WritableDataStore<Object> store = DataStoreUtil.makeStorage(ids, DataStoreFactory.HINT_DB, ometa.getRestrictionClass());
      for(it.seek(0); it.valid(); it.advance()) {
        store.put(it, bundle.data(it.getOffset(), i));
      }
      Relation<?> relation = new MaterializedRelation<>(ometa, ids, null, store);
      relations.add(relation);
      getHierarchy().add(this, relation);

      // Try to add indexes where appropriate
      for(IndexFactory<?> factory : indexFactories) {
        if(factory.getInputTypeRestriction().isAssignableFromType(ometa)) {
          @SuppressWarnings("unchecked")
          final IndexFactory<Object> ofact = (IndexFactory<Object>) factory;
          @SuppressWarnings("unchecked")
          final Relation<Object> orep = (Relation<Object>) relation;
          final Index index = ofact.instantiate(orep);
          Duration duration = LOG.isStatistics() ? LOG.newDuration(index.getClass().getName() + ".construction").begin() : null;
          index.initialize();
          if(duration != null) {
            LOG.statistics(duration.end());
          }
          getHierarchy().add(relation, index);
        }
      }
    }

    // fire insertion event
    eventManager.fireObjectsInserted(ids);
  }
351300
public void rerender() {
        clear();
        if (dataItems != null) {
            for (M m : dataItems) {
                addDataItem(m);
            }
        }
        doRefresh();
    }
152874
def load(self):
        
        #We load the database even when it is not configured to be
        #writable. After all, the user may decide part-way through a session to
        #begin writing again, and then we would want a history up to that point
        #to be valid.
        from os import path
        if path.isfile(self.dbpath):
            import json
            with open(self.dbpath) as f:
                jdb = json.load(f)
                self.entities = jdb["entities"]
                self.uuids = jdb["uuids"]
476944
@Override
	public void onQuery() {

		final App app = StructrApp.getInstance();
		try (final Tx tx = app.tx()) {

			final Map<String, SharedNodeInterface> nodes = new LinkedHashMap<>();
			for (final SharedNodeInterface node : app.nodeQuery(SharedNodeInterface.class).getAsList()) {
				nodes.put(node.getUuid(), node);
			}

			if (nodes.size() != repository.objectCount()) {

				logger.info("Rebuilding list of shared objects: {} vs. {}", new Object[] { nodes.size(), repository.objectCount() } );

				repository.clear();

				for (final SharedNodeInterface node : nodes.values()) {
					addObjectToRepository(node);
				}
			}

			tx.success();

		} catch (FrameworkException fex) {

			logger.warn("", fex);
		}
	}
350453
public function reloadBlacklist()
    {
        $this->cache->flush($this->getCacheKey());

        $this->blackListRegex = null;

        $this->loadBlacklist();
    }
823120
def open(self, dbname=None):
        '''
        
        '''
        databases = self.list()
        if self.is_closed():
            self.db_path = os.path.join(self.path, dbname or (databases and databases[0] or self.new()))
            if not self._opened:
                self.list_tables()
                self._opened = True
1015824
def update(self, **kwargs):
        
        self.reload_context(es_based=False, **kwargs)
        return super(ESCollectionView, self).update(**kwargs)
835645
function reload () {
        sourceRows.innerHTML = ""; // Clear content
        sources.forEach(function (source, index) {
            if (flavor && !flavor[index]) {
                return;
            }
            sourceRows.appendChild(rowFactory(source, index));
            updateSourceRow(source);
        });
    }
1198469
public function reload()
    {
        $this->_relations = array();
        if (is_array($this->_pk)) {
            $c = $p = [];
            foreach ($this->_originalPk as $k => $v) {
                $c[] = "`$k` = :pk_$k";
                $p[":pk_$k"] = $v;
            }
            $this->_attributes = $this->_db->table($this->_tableName)
                ->where(implode(" AND ", $c), $p)
                ->first();
        } else {
            $this->_attributes = $this->_db->table($this->_tableName)
                ->where("`{$this->_pk}` = :__pk")->setParam(':__pk', $this->_originalPk)
                ->first();
        }
        $this->_updatedAttributes = [];
        $this->afterLoad();
    }
276650
public void triggerReload() {
		synchronized (this.monitor) {
			synchronized (this.connections) {
				for (Connection connection : this.connections) {
					try {
						connection.triggerReload();
					}
					catch (Exception ex) {
						logger.debug("Unable to send reload message", ex);
					}
				}
			}
		}
	}
372556
protected function loadTableList()
    {
        if ($this->getDatabaseDriver() === 'sqlite') {
            $statement = "SELECT name FROM sqlite_master WHERE type='table';";
        } else {
            $statement = 'SHOW TABLES';
        }

        $tables = DB::select($statement);

        $this->tables = [];

        foreach ($tables as $tableObject) {

            $this->tables[] = array_get(array_values((array) $tableObject), '0');
        }
    }
680388
function databaseInitialize() {
  var users = db.getCollection("users");

  // on first run, this will be null so add collection
  if (!users) {
    users = db.addCollection("users");
  }

  // add simple 1 step 'females' transform on first run
  if (!users.getTransform("females")) {
    users.addTransform("females", [{ type: 'find', value: { gender: 'f' }}]);
  }
  
  // simple parameterized document paging transform
  if (!users.getTransform("paged")) {
    users.addTransform("paged", [
      {
        type: 'offset',
        value: '[%lktxp]pageStart'
      },
      {
        type: 'limit',
        value: '[%lktxp]pageSize'
      }
    ]);
  }

  // let's keep the dynamic view from dynview example without its sort
  if (!users.getDynamicView("over 500")) {
    let ov500 = users.addDynamicView("over 500");
    ov500.applyFind({ age: { $gte : 500 } });
  }

  // for this example we will also seed data on first run
  if (users.count() === 0) {
    seedData();
  }
  
  // at this point all collections, transforms and dynamic view should exist 
  // so go ahead and run your program logic
  runProgramLogic();
}