Fetch the next row of a query result set, returning a single sequence, or ``None`` when
        no more data is available.
1469
def fetchone(self):
        
        if self._state == self._STATE_NONE:
            raise Exception("No query yet")
        if not self._data:
            return None
        else:
            self._rownumber += 1
            return self._data.pop(0)
680859
def get_next(self, query, **options):
        """"""
        iterator = EventsPageIterator(self.client, '/events', query, options)
        result = iterator.next()
        return (result, iterator.sync)
288467
def debug_query_result(rows: Sequence[Any]) -> None:
    """"""
    log.info("Retrieved {} rows", len(rows))
    for i in range(len(rows)):
        log.info("Row {}: {}", i, rows[i])
880996
def next(self):
        
        try:
            return self.results.pop(0)
        except IndexError:
            if self.next_uri is None:
                raise StopIteration()
            else:
                if not self.next_uri:
                    if self.domain:
                        self.results = self.list_method(self.domain)
                    else:
                        self.results = self.list_method()
                else:
                    args = self.extra_args
                    self.results = self._list_method(self.next_uri, *args)
                self.next_uri = self.manager._paging.get(
                        self.paging_service, {}).get("next_uri")
        # We should have more results.
        try:
            return self.results.pop(0)
        except IndexError:
            raise StopIteration()
754917
def fetch(self, seq_id, start=None, end=None):
        
        rec = self._db.execute("""select * from seqinfo where seq_id = ? order by added desc""", [seq_id]).fetchone()

        if rec is None:
            raise KeyError(seq_id)

        if self._writing and self._writing["relpath"] == rec["relpath"]:
            logger.warning("""Fetching from file opened for writing;
            closing first ({})""".format(rec["relpath"]))
            self.commit()

        path = os.path.join(self._root_dir, rec["relpath"])
        fabgz = self._open_for_reading(path)
        return fabgz.fetch(seq_id, start, end)
1039901
async def fetchone(self):
        
        try:
            row = await self._cursor.fetchone()
        except AttributeError:
            self._non_result()
        else:
            if row is not None:
                return self._process_rows([row])[0]
            else:
                await self.close()
                return None
235596
public function next(){

		if(next($this->_fetched) instanceof SQLResultRow){

			return current($this->_fetched);
		}
		else{

			try{

				$mySQLResultRow = new MySQLResultRow($this->_result);
			}
			catch(SQLResultRowException $e){

				return false;
			}

			// Clear fetch buffer in case of an unbuffered result-set

			if(!$this->_buffered){

				$this->_fetched = [];
			}

			$this->_fetched[] = $mySQLResultRow;

			return $mySQLResultRow;
		}
	}
489557
async def fetchone(self) -> Optional[sqlite3.Row]:
        """"""
        return await self._execute(self._cursor.fetchone)
654724
def get_sequence(queries,fap=None,fmt='fasta',
            organism_taxid=9606,
                 test=False):
    
    url = 'http://www.ebi.ac.uk/Tools/dbfetch/dbfetch'
    params = {
    'id':' '.join(queries),
    'db':'uniprotkb',
    'organism':organism_taxid,    
    'format':fmt,
    'style':'raw',
    'Retrieve':'Retrieve',
    }
    response = requests.get(url, params=params)
    if test:
        print(response.url)
    if response.ok:
        if not fap is None:
            with open(fap,'w') as f:
                f.write(response.text)
            return fap
        else:
            return response.text            
    else:
        print('Something went wrong ', response.status_code)
404512
def _next(self, **kwargs):
        
        spec = self._pagination_default_spec(kwargs)
        spec.update(kwargs)

        query = queries.build_query(spec)
        query = queries.where_after_entry(query, self._record)

        for record in query.order_by(model.Entry.local_date,
                                     model.Entry.id)[:1]:
            return Entry(record)
        return None
456030
private void sequenceQuery(QueryEntry entry, CompletableFuture<QueryResponse> future) {
    // Get the client's server session. If the session doesn't exist, return an unknown session error.
    ServerSessionContext session = context.getStateMachine().executor().context().sessions().getSession(entry.getSession());
    if (session == null) {
      future.complete(logResponse(QueryResponse.builder()
        .withStatus(Response.Status.ERROR)
        .withError(CopycatError.Type.UNKNOWN_SESSION_ERROR)
        .build()));
    } else {
      sequenceQuery(entry, session, future);
    }
  }
352517
def _get_next_buffered_row(self):
        
        if self._iter_row == self._iter_nrows:
            raise StopIteration

        if self._row_buffer_index >= self._iter_row_buffer:
            self._buffer_iter_rows(self._iter_row)

        data = self._row_buffer[self._row_buffer_index]
        self._iter_row += 1
        self._row_buffer_index += 1
        return data
1316192
def next(self):
        
        if self.row < self.data.num_instances:
            index = self.row
            self.row += 1
            return self.data.get_instance(index)
        else:
            raise StopIteration()
1037540
def get_last(self, table=None):
        """"""
        if table is None: table = self.main_table
        query = 'SELECT * FROM "%s" ORDER BY ROWID DESC LIMIT 1;' % table
        return self.own_cursor.execute(query).fetchone()
1041647
def next(self):
    """"""
    if self._fut is None:
      self._fut = self._iter.getq()
    try:
      try:
        # The future result is set by this class's _extended_callback
        # method.
        # pylint: disable=unpacking-non-sequence
        (ent,
         self._cursor_before,
         self._cursor_after,
         self._more_results) = self._fut.get_result()
        return ent
      except EOFError:
        self._exhausted = True
        raise StopIteration
    finally:
      self._fut = None
478387
def fetchall(self, sql: str, *args) -> Sequence[Sequence[Any]]:
        """"""
        self.ensure_db_open()
        cursor = self.db.cursor()
        self.db_exec_with_cursor(cursor, sql, *args)
        try:
            rows = cursor.fetchall()
            return rows
        except:  # nopep8
            log.exception("fetchall: SQL was: " + sql)
            raise
365369
def get_last(self, n=1):
        
        rows = []
        # Get values from the partial db first
        if self.tracker.dbcon_part and check_table_exists(self.tracker.dbcon_part, self.name):
            rows.extend(get_last_row(self.tracker.dbcon_part, self.name, n))
        # Then add rows from the master if required
        if len(rows) < n and check_table_exists(self.tracker.dbcon_master, self.name):
            rows.extend(get_last_row(self.tracker.dbcon_master, self.name, n))
        return rows[-n:]