Loads all primary key labels from the MySQL database.
769055
private function loadLabels(): void
  {
    $tables = DataLayer::getLabelTables();
    foreach ($tables as $table)
    {
      $rows = DataLayer::getLabelsFromTable($table['table_name'], $table['id'], $table['label']);
      foreach ($rows as $row)
      {
        $this->labels[$row['label']] = $row['id'];
      }
    }
  }
1067375
private function loadLateLoadProperty()
    {
        // can only lateLateLoad a property if it is the sole primary key
        $pks = $this->pgClass->getPrimaryKeys();

        $this->lateLoadProperty = ( count( $pks ) === 1 )
            ? $pks->pop()->name
            : null
            ;

    }
441797
protected function loadData()
    {
        if (null === $this->data) {
            $this->statement->execute();
            $this->data = $this->statement->fetchAll(\PDO::FETCH_ASSOC);
        }
    }
216754
protected function buildMapperPrimaryKeys()
    {

        $fields = array();

        foreach ($this->columns as $column) {
            if ($column->isPrimaryKey()) {
                $fields[] = "        '" . $column->getName() . "'";
            }
        }

        $this->vars['db_primary_keys'] = implode(",\n", $fields);
    }
240207
def _loadDB(self):
        """"""
        if not self._validID():
            raise NotFound, self._getID()
        (sql, fields) = self._prepareSQL("SELECT")
        curs = self.cursor()
        curs.execute(sql, self._getID())
        result = curs.fetchone()
        if not result:
            curs.close()
            raise NotFound, self._getID()
        self._loadFromRow(result, fields, curs)
        curs.close()
        self._updated = time.time()
1215379
private void populateEntityMap() throws SQLException
   {
      for (Row row : getRows("select * from z_primarykey"))
      {
         m_entityMap.put(row.getString("Z_NAME"), row.getInteger("Z_ENT"));
      }
   }
757862
private function _getData($primaryKey)
    {
        $table = $this->table;
        $db = $this->db;

        $query = "SELECT * FROM {$table->getTableName()} WHERE {$table->getPrimaryKey()} = $primaryKey";
        $sth = $table->getAdapter()->prepare($query);
        $sth->execute();

        return $sth->fetch($db::FETCH_ASSOC);
    }
66169
def from_dataframe(cls, name, df, indices, primary_key=None):
        """"""

        # ordered list (column_name, column_type) pairs
        column_types = []
        # which columns have nullable values
        nullable = set()

        # tag cached database by dataframe's number of rows and columns
        for column_name in df.columns:
            values = df[column_name]
            if values.isnull().any():
                nullable.add(column_name)
            column_db_type = db_type(values.dtype)
            column_types.append((column_name.replace(" ", "_"), column_db_type))

        def make_rows():
            return list(tuple(row) for row in df.values)

        return cls(
            name=name,
            column_types=column_types,
            make_rows=make_rows,
            indices=indices,
            nullable=nullable,
            primary_key=primary_key)
1046461
public function loadAssoc()
	{
		$this->connect();

		$ret = null;

		// Execute the query and get the result set cursor.
		if (!($cursor = $this->execute()))
		{
			return;
		}

		// Get the first row from the result set as an associative array.
		$array = $this->fetchAssoc($cursor);

		if ($array)
		{
			$ret = $array;
		}

		// Free up system resources and return.
		$this->freeResult($cursor);

		return $ret;
	}
940483
protected function loadPClasses()
    {
        try {
            $sth = $this->pdo->prepare(
                "SELECT * FROM `{$this->dbName}`.`{$this->dbTable}`",
                array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY)
            );
            $sth->execute();

            while ($row = $sth->fetch(PDO::FETCH_ASSOC, PDO::FETCH_ORI_NEXT)) {
                $this->addPClass(new KlarnaPClass($row));
            }

            $sth->closeCursor();
            $sth = null;
        } catch (PDOException $e) {
            throw new Klarna_DatabaseException(
                'Could not fetch PClasses from database!'
            );
        }
    }
290488
def primaryKeys(self, table, catalog=None, schema=None):  # nopep8
        """"""
        fut = self._run_operation(self._impl.primaryKeys, table,
                                  catalog=catalog, schema=schema)
        return fut
167994
def load(self, data: dict):
        
        for i, label in enumerate(self.keys):
            key = label.cget('text')
            if key in data.keys():
                entry_was_enabled = True if \
                    self.values[i].cget('state') == 'normal' else False
                if not entry_was_enabled:
                    self.values[i].config(state='normal')

                self.values[i].delete(0, tk.END)
                self.values[i].insert(0, str(data[key]))

                if not entry_was_enabled:
                    self.values[i].config(state='disabled')
393799
def primary_key(cls):
        

        if cls.__from_class__:
            cls = cls.__from_class__
        return cls.__table__.primary_key.columns.values()[0].name
1325677
private function loadDatabases()
	{
		$databaseKeys = $this->config->get('databases:keys')?: [];

		if (!isset($databaseKeys['database'])) $databaseKeys[] = 'database'; // Default database config key

		foreach ($databaseKeys as $databaseKey) {
			$database = $this->config->get($databaseKey);
			if ($database !== false) $this->initConnection($database, $databaseKey);
			$this->config->destroy($databaseKey);
			unset($database);
		}
    }
832449
protected function loadMappings()
    {
        // using a subquery to allow for FETCH_KEY_PAIR
        $query = '
            SELECT
                name, path
            FROM (
                SELECT
                    menu_item.name,
                    menu_item.path,
                    COALESCE(menu_item.language, root_item.language) language
                FROM
                    menu_item INNER JOIN menu_item root_item ON (menu_item.root=root_item.id)
                WHERE
                    menu_item.path IS NOT NULL
                    AND menu_item.name IS NOT NULL AND LENGTH(menu_item.name) > 0
                HAVING
                    language IS NULL OR language=:lang
            ) s
            ORDER BY
                language=:lang DESC
        ';
        $stmt = $this->em->getConnection()->prepare($query);
        $stmt->execute([':lang' => $this->router->getContext()->getParameter('_locale')]);
        $this->addAll($stmt->fetchAll(\PDO::FETCH_KEY_PAIR));
    }
209577
public function load()
    {
        $app = Facade::getFacadeApplication();
        /** @var $database \Concrete\Core\Database\Connection\Connection */
        $database = $app->make('database')->connection();
        $gIDs = $database->fetchAll(
            'select gID from PermissionAccessEntityGroups
            where peID = ? order by gID asc',
            [$this->peID]
        );
        if ($gIDs && is_array($gIDs)) {
            for ($i = 0; $i < count($gIDs); ++$i) {
                $g = Group::getByID($gIDs[$i]['gID']);
                if (is_object($g)) {
                    $this->groups[] = $g;
                    $this->label .= $g->getGroupDisplayName();
                    if ($i + 1 < count($gIDs)) {
                        $this->label .= t(
                            /*i18n: used for combining Group Display Names,
                             eg GroupName1 + GroupName2 */
                            ' + '
                        );
                    }
                }
            }
        }
    }
793367
def load_data(self, pdbid):
        """"""
        f = urlopen("http://projects.biotec.tu-dresden.de/plip-rest/pdb/%s?format=xml" % pdbid.lower())
        self.doc = etree.parse(f)