code: public function readSession($id)
      {
          $query = new Query();
          $query->from($this->sessionTable)
              ->where('[[expire]]>:expire AND [[id]]=:id', [':expire' => time(), ':id' => $id]);
  
          if ($this->readCallback !== null) {
              $fields = $query->one($this->db);
              return $fields === false ? '' : $this->extractData($fields);
          }
  
          $data = $query->select(['data'])->scalar($this->db);
          return $data === false ? '' : $data;
      }
docs: Session read handler.
  @internal Do not call this method directly.
  @param string $id session ID
  @return string the session data