Gets a database connection by ID.

@param string $id

@throws JAQBException if the connection does not exist

@return QueryBuilder
554963
public function get($id)
    {
        if (isset($this->connections[$id])) {
            return $this->connections[$id];
        }

        if (!isset($this->config[$id])) {
            throw new JAQBException('No configuration or connection has been supplied for the ID "'.$id.'".');
        }

        $this->connections[$id] = $this->buildFromConfig($this->config[$id], $id);

        return $this->connections[$id];
    }
424903
public function getById($id)
    {
        $sql = "SELECT * FROM " . $this->getTable() . " WHERE " . $this->getPrimaryKey() . " = " . intval($id) . ";";

        try {
            $result = $this->db->query($sql);
        } catch (\PDOException $e) {
            throw new DatabaseException($e->getMessage() . '<br>' . $sql);
        }
        return $this->fetchAssoc($result);

    }
113915
public function findById($id)
    {
        $id = $this->getRepository()->idToMongo($id);
        return $this->mergeCriteria(array('_id' => $id));
    }
204955
public function findById($id) {
    $dataConnection = $this->app->getDataConnection($this->connection);
    $result = $dataConnection->findOneByField($this->idColumn, $dataConnection->convertToNativeId($id),
      $this->table, $this->readFields);
    if ($result == NULL) {
      return FALSE;
    }
    $this->load($result);
    return TRUE;
  }
1019350
public function find($id) {
        $pri = $this->connection->getPrimaryKey();
        if ($pri && $id) {
            $data = $this->where($pri, '=', $id)->first();

            return $data;
        }
    }
612157
public function byId($id, $databaseConnectionName = null)
  {
    if(empty($databaseConnectionName))
    {
      $databaseConnectionName = $this->databaseConnectionName;
    }

  	return $this->VoucherType->on($databaseConnectionName)->find($id);
  }
1197810
public function retrieve($id)
    {
        $this->repository->finder()->pushCriteria(new ByPid($id));
        $patientInterface = $this->repository->find();
        return $this->interfaceToModel($patientInterface);
    }
779676
public function findById($id)
    {
        $id = (int) $id;
        if ($id) {
            $sql = sprintf("SELECT id, name, created_at FROM {$this->tableName} WHERE id=%d LIMIT 1", $id);
            if ($row = $this->adapter->selectRow($sql)) {
                return $this->_makeModel($row);
            }
        }
        return null;
    }
714080
public function find($id)
    {
        return $this
            ->getQueryBuilder()
            ->andWhere($this->getAlias().'.id = '.intval($id))
            ->getQuery()
            ->getOneOrNullResult()
        ;
    }
1216046
public function getById($id)
    {
        $this->_db->query(
            'SELECT * FROM '.$this->_dbConfig['table']
                          .' WHERE '.$this->_dbConfig['id'].' = :id',
            [':id'=>$id]
        );
        $row = $this->_db->result();
        if (isset($row[0])) {
            $row = $row[0]->getAll();

            $this->_login = true; //Setando LOGIN como válido/logado

            foreach ($this->_data as $i => $d) {
                if (isset($row[$this->_dbConfig[$i]])) {
                    $this->_data[$i] = $row[$this->_dbConfig[$i]];
                }
            }
            return $this->_data;
        }
        return false;
    }
125582
def get_connection_by_id(self, id):
        ''''''
        with self._mutex:
            for conn in self.connections:
                if conn.id == id:
                    return conn
            return None
916909
public function findById($id)
    {
        $query =
            'SELECT `' .
            $this->getFields("`, `") . '`
            FROM ' . $this->tableName .
            ' WHERE `id`=:id LIMIT 1';
        $statement = $this->database->prepare($query);
        $statement->bindParam(':id', $id);
        $statement->execute();
        $this->entity->fill($statement->fetch());
        return $this->entity;
    }
433320
public function fetchById ($id)
    {
        $record = $this->query->fetchById($id);

        if ($record instanceof \stdClass) {
            $this->setRecord($record);
        } else {
            $this->record = null;
        }
    }
85190
protected function getQBuilderBaseEditables($id) {
        $query_builder = $this->createQueryBuilder("entity")
                ->select('entity') //, 'trans')
//                ->leftjoin('entity.translations', 'trans')
//                ->join('trans.trans_lang', 'language', \Doctrine\ORM\Query\Expr\join::WITH, "language.status in (1, 2)")
                ->where("entity.id = :id")
//                ->andWhere("language.status in (1, 2)")
                ->setParameter('id', $id);
        return $query_builder;
    }
371174
public function getById($id)
    {
        $this->getLogger()->info('Getting dataSet ID ' . $id);
        $response = $this->doGet($this->url, [
            'dataSetId' => $id
        ]);

        if (count($response) <= 0)
            throw new XiboApiException('Expecting a single record, found ' . count($response));

        return clone $this->hydrate($response[0]);
    }
1253763
public function getById($id)
    {
        $volume = $this->adapter->get(sprintf('%s/volumes/%s?per_page=%d', $this->endpoint, $id, 200));

        $volume = json_decode($volume);

        return new VolumeEntity($volume->volume);
    }
389697
public function getById($id, array $options = [])
    {
        $query = $this->createBaseBuilder($options);

        return $query->find($id);
    }