\Google\AdsApi\AdWords\Query\v201809ReportQueryBuilderDelegate

A delegate of `ReportQueryBuilder`, which shouldn't be used directly.

Use ReportQueryBuilder to build a ReportQuery object.

Summary

Methods
Properties
Constants
copyFrom()
select()
from()
where()
duringDateRange()
during()
build()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
buildSelectClause()
appendFromClause()
appendWhereClause()
appendDuringClause()
$selectFields
$whereBuilders
$fromReportType
$duringDateRangeType
$duringStartDate
$duringEndDate
N/A

Properties

$selectFields

$selectFields :

Type

$fromReportType

$fromReportType :

Type

$duringDateRangeType

$duringDateRangeType :

Type

$duringStartDate

$duringStartDate :

Type

$duringEndDate

$duringEndDate :

Type

Methods

copyFrom()

copyFrom(\Google\AdsApi\AdWords\Query\v201809\ReportQueryBuilderDelegate  $otherInstance,\Google\AdsApi\AdWords\Query\v201809\ReportQueryBuilder  $queryBuilder): \Google\AdsApi\AdWords\Query\v201809\ReportQueryBuilderDelegate

Creates a new query builder delegate object by copying field names, WHERE, FROM and DURING clauses from another query builder delegate object.

Parameters

\Google\AdsApi\AdWords\Query\v201809\ReportQueryBuilderDelegate $otherInstance

the other query builder delegate object for copying field names, FROM and DURING clauses

\Google\AdsApi\AdWords\Query\v201809\ReportQueryBuilder $queryBuilder

the query builder object for continuation of building a complete AWQL string

Returns

\Google\AdsApi\AdWords\Query\v201809\ReportQueryBuilderDelegate

a new query builder delegate object that copies from the input one

select()

select(array  $fields)

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

from()

from(string  $reportType)

Sets the report type for 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

where()

where(string  $field,\Google\AdsApi\AdWords\Query\v201809\ReportQueryBuilder  $reportQueryBuilder): \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

\Google\AdsApi\AdWords\Query\v201809\ReportQueryBuilder $reportQueryBuilder

the query builder object for building other parts of the AWQL string

Returns

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

a builder object for setting a logic operation and argument in the WHERE clause

duringDateRange()

duringDateRange(string  $dateRangeType)

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

during()

during(string  $startDate,string  $endDate)

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

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

buildSelectClause()

buildSelectClause(): string

Builds the SELECT clause of the AWQL string.

Returns

string —

the SELECT clause

appendFromClause()

appendFromClause(string  $awql): string

Appends the FROM clause to a partial AWQL string.

Parameters

string $awql

a partial AWQL string without the FROM clause

Returns

string —

an AWQL string with the FROM clause

appendWhereClause()

appendWhereClause(string  $awql): string

Appends the WHERE clause to a partial AWQL string if the `where()` function was called prior to this function; Otherwise, this function is a no-op.

Parameters

string $awql

a partial AWQL string to append the WHERE clause

Returns

string —

the AWQL string with the WHERE clause if the where() function was called prior to this function; Otherwise, returns the AWQL without modifications

appendDuringClause()

appendDuringClause(string  $awql): string

Appends the DURING clause to a partial AWQL string if the `duringDateRange()` or `during()` function was called prior to this function; Otherwise, this function is a no-op.

Parameters

string $awql

a partial AWQL string without a DURING clause

Returns

string —

an AWQL string with a DURING clause if a date range was specified; Otherwise, returns the input AWQL string without modifications