PHP Class Cassandra\Rows

Inheritance: implements Iterator, implements Countable, implements ArrayAccess
Show file Open project: datastax/php-driver

Public Methods

Method Description
count ( ) : integer Returns the number of rows.
current ( ) : array Returns current row.
first ( ) : array | null Get the first row.
isLastPage ( ) : boolean Check for the last page when paging.
key ( ) : integer Returns current index.
next ( ) : void Advances the rows iterator by one.
nextPage ( float | null $timeout = null ) : Rows | null Get the next page of results.
nextPageAsync ( ) : cassandra\Future Get the next page of results asynchronously.
offsetExists ( integer $offset ) : boolean Returns existence of a given row.
offsetGet ( integer $offset ) : array | null Returns a row at given index.
offsetSet ( integer $offset, array $value ) : void Sets a row at given index.
offsetUnset ( integer $offset ) : void Removes a row at given index.
pagingStateToken ( ) : string Returns the raw paging state token.
rewind ( ) : void Resets the rows iterator.
valid ( ) : boolean Returns existence of more rows being available.

Method Details

count() public method

Returns the number of rows.
See also: Countable::count()
public count ( ) : integer
return integer number of rows

current() public method

Returns current row.
See also: Iterator::current()
public current ( ) : array
return array current row

first() public method

Get the first row.
public first ( ) : array | null
return array | null returns first row if any

isLastPage() public method

Check for the last page when paging.
public isLastPage ( ) : boolean
return boolean whether this is the last page or not

key() public method

Returns current index.
See also: Iterator::key()
public key ( ) : integer
return integer index

next() public method

Advances the rows iterator by one.
See also: Iterator::next()
public next ( ) : void
return void

nextPage() public method

Get the next page of results.
public nextPage ( float | null $timeout = null ) : Rows | null
$timeout float | null
return Rows | null loads and returns next result page

nextPageAsync() public method

Get the next page of results asynchronously.
public nextPageAsync ( ) : cassandra\Future
return cassandra\Future returns future of the next result page

offsetExists() public method

Returns existence of a given row.
See also: ArrayAccess::offsetExists()
public offsetExists ( integer $offset ) : boolean
$offset integer row index
return boolean whether a row at a given index exists

offsetGet() public method

Returns a row at given index.
See also: ArrayAccess::offsetGet()
public offsetGet ( integer $offset ) : array | null
$offset integer row index
return array | null row at a given index

offsetSet() public method

Sets a row at given index.
See also: ArrayAccess::offsetSet()
public offsetSet ( integer $offset, array $value ) : void
$offset integer row index
$value array row value
return void

offsetUnset() public method

Removes a row at given index.
See also: ArrayAccess::offsetUnset()
public offsetUnset ( integer $offset ) : void
$offset integer row index
return void

pagingStateToken() public method

Returns the raw paging state token.
public pagingStateToken ( ) : string
return string

rewind() public method

Resets the rows iterator.
See also: Iterator::rewind()
public rewind ( ) : void
return void

valid() public method

Returns existence of more rows being available.
See also: Iterator::valid()
public valid ( ) : boolean
return boolean whether there are more rows available for iteration