Cassandra\Rows represent a result of statement execution.

Implements

  • Iterator
  • Countable
  • ArrayAccess

Methods

int

count

( )

Returns the number of rows.

Returns:
Type Details
int

number of rows

See Also:
  • Countable::count()
void

rewind

( )

Resets the rows iterator.

Returns:
Type Details
void
See Also:
  • Iterator::rewind()
array

current

( )

Returns current row.

Returns:
Type Details
array

current row

See Also:
  • Iterator::current()
int

key

( )

Returns current index.

Returns:
Type Details
int

index

See Also:
  • Iterator::key()
void

next

( )

Advances the rows iterator by one.

Returns:
Type Details
void
See Also:
  • Iterator::next()
bool

valid

( )

Returns existence of more rows being available.

Returns:
Type Details
bool

whether there are more rows available for iteration

See Also:
  • Iterator::valid()
bool

offsetExists

( int $offset )

Returns existence of a given row.

Parameters:
Name Type Details
$offset int

row index

Returns:
Type Details
bool

whether a row at a given index exists

See Also:
  • ArrayAccess::offsetExists()
array null

offsetGet

( int $offset )

Returns a row at given index.

Parameters:
Name Type Details
$offset int

row index

Returns:
Type Details
array|null

row at a given index

See Also:
  • ArrayAccess::offsetGet()
void

offsetSet

( int $offset, array $value )

Sets a row at given index.

Parameters:
Name Type Details
$offset int

row index

$value array

row value

Throws:
Type Details
Exception\DomainException
Returns:
Type Details
void
See Also:
  • ArrayAccess::offsetSet()
void

offsetUnset

( int $offset )

Removes a row at given index.

Parameters:
Name Type Details
$offset int

row index

Throws:
Type Details
Exception\DomainException
Returns:
Type Details
void
See Also:
  • ArrayAccess::offsetUnset()
bool

isLastPage

( )

Check for the last page when paging.

Returns:
Type Details
bool

whether this is the last page or not

Cassandra\Rows null

nextPage

( float $timeout = null )

Get the next page of results.

Parameters:
Name Type Details
$timeout float
Returns:
Type Details
Rows|null

loads and returns next result page

Cassandra\Future

nextPageAsync

( )

Get the next page of results asynchronously.

Returns:
Type Details
Cassandra\Future

returns future of the next result page

string

pagingStateToken

( )

Returns the raw paging state token.

Returns:
Type Details
string
array null

first

( )

Get the first row.

Returns:
Type Details
array|null

returns first row if any