\Google\AdsApi\AdWords\Query\v201809ReportQueryBuilder

Uses a delegate to build a `ReportQuery` object and records utility of itself.

Summary

Methods
Properties
Constants
__construct()
copyFrom()
select()
from()
where()
duringDateRange()
during()
build()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$delegate
$utilityRegistry
N/A

Properties

$delegate

$delegate :

Type

$utilityRegistry

$utilityRegistry :

Type

Methods

select()

select(array  $fields): \Google\AdsApi\AdWords\Query\v201809\ReportQueryBuilder

Sets the fields for the SELECT clause. Field names can be repeated and their order will be preserved.

Parameters

array $fields

the fields for building the SELECT clause

Returns

\Google\AdsApi\AdWords\Query\v201809\ReportQueryBuilder

the current instance of ReportQueryBuilder for chaining

from()

from(string  $reportType): \Google\AdsApi\AdWords\Query\v201809\ReportQueryBuilder

Sets the report type to be added to the FROM clause of an AWQL string.

Parameters

string $reportType

name of a report type to be added to the FROM clause of an AWQL string, as defined in ReportDefinitionReportType

Returns

\Google\AdsApi\AdWords\Query\v201809\ReportQueryBuilder

the current instance of ReportQueryBuilder for chaining

where()

where(string  $field): \Google\AdsApi\AdWords\Query\v201809\ReportQueryWhereBuilder

Sets the field name to be added to the WHERE clause. Every time this function is called, it will add a new condition to the WHERE clause.

All conditions are connected using the AND operator.

Parameters

string $field

a field name to be added to the WHERE clause

Returns

\Google\AdsApi\AdWords\Query\v201809\ReportQueryWhereBuilder

a builder object for building the WHERE clause

duringDateRange()

duringDateRange(string  $dateRangeType): \Google\AdsApi\AdWords\Query\v201809\ReportQueryBuilder

Sets the date range type for the DURING clause.

Parameters

string $dateRangeType

a date range type to be added to the DURING clause of an AWQL string, as defined in ReportDefinitionDateRangeType

Returns

\Google\AdsApi\AdWords\Query\v201809\ReportQueryBuilder

the current instance of ReportQueryBuilder for chaining

during()

during(string  $startDate,string  $endDate): \Google\AdsApi\AdWords\Query\v201809\ReportQueryBuilder

Sets a custom date range by specifying the start and end dates.

Parameters

string $startDate

the start date for the DURING clause of an AWQL string

string $endDate

the end date for the DURING clause of an AWQL string

Returns

\Google\AdsApi\AdWords\Query\v201809\ReportQueryBuilder

the current instance of ReportQueryBuilder for chaining

build()

build(): \Google\AdsApi\AdWords\Query\v201809\ReportQuery

Builds a new `ReportQuery` object.

Throws

\RuntimeException

if the select() and from() functions were not called prior to this function

Returns

\Google\AdsApi\AdWords\Query\v201809\ReportQuery

a new ReportQuery object