Cloud Firestore Client - Class AggregateQuerySnapshot (1.45.1)

Reference documentation and code samples for the Cloud Firestore Client class AggregateQuerySnapshot.

Represents the result set of an AggregateQuery.

Example:

use Google\Cloud\Firestore\FirestoreClient;

$firestore = new FirestoreClient();
$collection = $firestore->collection('users');
$query = $collection->where('age', '>', 18);

$snapshot = $query->count();

Namespace

Google \ Cloud \ Firestore

Methods

__construct

An immutable snapshot of aggregate query results.

Parameter
Name Description
snapshot array

Result of an AggregateQuery.

getTransaction

Get the transaction id.

Returns
Type Description
string

getReadTime

Get the Aggregation read time.

Returns
Type Description
Google\Cloud\Core\Timestamp

get

Get the Query Aggregation value.

Parameter
Name Description
alias string

The aggregation alias.

Returns
Type Description
mixed