Skip to content

ResultSet

  • Full name: \Qubus\Expressive\ResultSet

Properties

statement

protected \PDOStatement $statement

Methods

__construct

Constructor

public __construct(\PDOStatement $statement): mixed

Parameters:

Parameter Type Description
$statement \PDOStatement The PDOStatement associated with this result set.

__destruct

Destructor

public __destruct(): mixed

count

Count affected rows

public count(): int

all

Fetch all results.

public all(callable|null $callable = null, int $fetchStyle): array|false

Parameters:

Parameter Type Description
$callable callable|null (optional) Callback function
$fetchStyle int (optional) PDO fetch style

allGroup

public allGroup(bool $uniq = false, callable|null $callable = null): array|false

Parameters:

Parameter Type Description
$uniq bool (optional)
$callable callable|null (optional)

first

Fetch first result

public first(callable|null $callable = null): mixed

Parameters:

Parameter Type Description
$callable callable|null (optional) Callback function

next

Fetch next result

public next(): mixed

flush

Close current cursor

public flush(): bool

column

Return a column

public column(int $col): mixed

Parameters:

Parameter Type Description
$col int 0-indexed number of the column you wish to retrieve

fetchAssoc

Fetch each result as an associative array

public fetchAssoc(): $this

fetchObject

Fetch each result as an stdClass object

public fetchObject(): $this

fetchNamed

public fetchNamed(): $this

fetchNum

public fetchNum(): $this

fetchBoth

public fetchBoth(): $this

fetchKeyPair

public fetchKeyPair(): $this

fetchClass

public fetchClass(string $class, array $ctorargs = []): $this

Parameters:

Parameter Type Description
$class string
$ctorargs array (optional)

fetchCustom

public fetchCustom(\Closure $func): $this

Parameters:

Parameter Type Description
$func \Closure


Automatically generated on 2025-10-13