从结果集中获取下一行
@param integer $fetchStyle
@param integer $cursorOrientation
@param integer $cursorOffset
@return mixed
7116
public function fetch(int $fetchStyle = \PDO::FETCH_ASSOC, int $cursorOrientation = \PDO::FETCH_ORI_NEXT, int $cursorOffset = 0)
    {
        return $this->statement->fetch($fetchStyle, $cursorOrientation, $cursorOffset);
    }
1050156
public function getNumRows($cursor = null)
    {
        $this->connect();

        if ($cursor instanceof Statement) {
            return $cursor->rowCount();
        } elseif ($this->prepared instanceof Statement) {
            return $this->prepared->rowCount();
        } else {
            return 0;
        }
    }
20212
public function cursor($query, $bindings = [], $useReadPdo = true)
    {
        $statement = $this->run($query, $bindings, function ($query, $bindings) use ($useReadPdo) {
            if ($this->pretending()) {
                return [];
            }

            // First we will create a statement for the query. Then, we will set the fetch
            // mode and prepare the bindings for the query. Once that's done we will be
            // ready to execute the query against the database and return the cursor.
            $statement = $this->prepared($this->getPdoForSelect($useReadPdo)
                              ->prepare($query));

            $this->bindValues(
                $statement, $this->prepareBindings($bindings)
            );

            // Next, we'll execute the query against the database and return the statement
            // so we can return the cursor. The cursor will use a PHP generator to give
            // back one row at a time without using a bunch of memory to render them.
            $statement->execute();

            return $statement;
        });

        while ($record = $statement->fetch()) {
            yield $record;
        }
    }
1356706
@Override
    public void fetch(int numExamples) {
        initializeCurrFromList(data.get(ArrayUtil.range(cursor, cursor + numExamples)).asList());

    }
36817
@Override
  public <T> Cursor<T> selectCursor(String statement) {
    return delegate.selectCursor(statement);
  }
911193
public static ResultSet executeAdaptiveQuery(Session session, Statement statement, int fetchSize) {
        int remainingAdaptations = MAX_ADAPTATIONS;
        while (true) {
            try {
                statement.setFetchSize(fetchSize);
                ResultSet resultSet = session.execute(statement);
                return new AdaptiveResultSet(session, resultSet, remainingAdaptations);
            } catch (Throwable t) {
                if (isAdaptiveException(t) && --remainingAdaptations != 0 && fetchSize > MIN_FETCH_SIZE) {
                    // Try again with half the fetch size
                    fetchSize = Math.max(fetchSize / 2, MIN_FETCH_SIZE);
                    _log.debug("Repeating previous query with fetch size {} due to {}", fetchSize, t.getMessage());
                } else {
                    throw Throwables.propagate(t);
                }
            }
        }
    }
969074
public function fetchAll($fetch_style = null, $fetch_argument = null, $ctor_args = null)
    {
        if ($fetch_style === null) {
            return parent::fetchAll();
        }

        if ($fetch_argument === null) {
            return parent::fetchAll($fetch_style);
        }

        if ($ctor_args === null) {
            return parent::fetchAll($fetch_style, $fetch_argument);
        }

        return parent::fetchAll($fetch_style, $fetch_argument, $ctor_args);
    }
1232836
def _produce_return(self, cursor):
        
        results = cursor.fetchall()

        # Format rows within a generator?
        if self._row_formatter is not None:
            return (self._row_formatter(r, cursor) for r in results)

        return results
441482
public function fetch($fetch_style = PDO::FETCH_ASSOC, $cursor_orientation = PDO::FETCH_ORI_NEXT, $cursor_offset = 0)
    {
        return $this->PDO->fetch($fetch_style, $cursor_orientation, $cursor_offset);
    }
397072
public function fetch(FetchConfig $fetchConfig)
    {
        $rows = $this->fetchAll($fetchConfig);

        if (isset($rows[++$this->rowIndex])) {
            return $rows[$this->rowIndex];
        }

        return false;
    }
1117040
public function getRows($fetch_style = null)
    {
        if (is_null($fetch_style)) {
            $fetch_style = \PDO::FETCH_ASSOC;
        }
        try {
            return $this->stmt->fetchAll($fetch_style);
        } catch (\PDOException $e) {
            die("Error: " . $e->getMessage());
        }
    }
671742
public function fetch($style = \PDO::FETCH_ASSOC, $orientation = \PDO::FETCH_ORI_NEXT, $offset = 0)
    {
        if ($this->rowCount() == 0) {
            return false;
        }

        $result = $this->statement->fetch($style, $orientation, $offset);

        if ($this->model !== null) {
            $model = $this->model;
            return new $model($result, false);
        } else {
            return $result;
        }
    }
1111232
private function fetch($getData=true) {
      try{
         $this->connection();
         $this->resultset = $this->id_conn->prepare($this->sql);
         $this->resultset->execute($this->placeholder_data);
         $this->resultset->setFetchMode( $this->{'FETCH_' . strtoupper( $this->type_fetch )} );
         if ( $getData ) {
            $this->rows     = $this->resultset->fetchAll();
            $this->rowCount = $this->resultset->rowCount();
            // while ( $row = $this->resultset->fetch() ) {
            //    $this->rows[] = $row;
            //    $this->rowCount++;
            // }
         }

         $this->get_instance();
      } catch (\PDOException $e) {
         die("Error: " . $e->getMessage() . "<br/>");
      }

      return $this;
   }
1328903
@Override
  public final IRecordSet<Cursor>
    retrieveRecords(final String pSelect) throws ExceptionWithCode {
    try {
      boolean isDbg = getLogger().getIsShowDebugMessagesFor(getClass())
        && getLogger().getDetailLevel() > 30000;
      if (isDbg) {
        getLogger().debug(null, SrvDatabase.class, "try to retrieve records: "
          + pSelect);
      }
      Cursor rs = this.sqliteDatabase.rawQuery(pSelect, null);
      RecordSetAndroid rsa = new RecordSetAndroid(rs);
      if (isDbg) {
        getLogger().debug(null, SrvDatabase.class, "Recordset: " + rsa);
      }
      return rsa;
    } catch (Exception ex) {
      String msg = ex.getMessage() + ", query:\n" + pSelect;
      ExceptionWithCode ewc = new ExceptionWithCode(SrvDatabase.SQL_EXEC_ERROR,
        msg);
      ewc.setStackTrace(ex.getStackTrace());
      throw ewc;
    }
  }
199511
public final Cursor<T> select (Connection conn, String condition)
    {
        String query = "select " + listOfFields + " from " + name +
            " " + condition;
        return new Cursor<T>(this, conn, query);
    }
347192
public function cursor()
    {
        static $stmt;
        if (!$stmt) {
            $this->setPrepareParams(array(\PDO::ATTR_CURSOR => \PDO::CURSOR_SCROLL));
            $this->prepFetch();
            $stmt = $this->oosql_stmt;
        }

        return $stmt;
    }
1086156
public function fetch($type = \PDO::FETCH_ASSOC, $ori = null, $offset = 0)
    {
        $this->execute();

        if (!$this->cursor) {
            return false;
        }

        return $this->getCursor()->fetch($type);
    }