The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Google::Ads::AdWords::Utilities::ReportQueryBuilder

DESCRIPTION

A query builder for building AWQL queries for reporting.

ATTRIBUTES

The attributes may be set in new() and accessed using get_ATTRIBUTE methods:

select

An array of fields that are selected to be filtered on.

from_report

The name of the report queried.

date_range_or_start_date

The date range string in the during clause or the start date in the during clause when the end_date is specified.

end_date

The end date of the date range in the during clause.

METHODS

new

Constructor. The following data structure may be passed to new():

 { # Google::Ads::AdWords::Utilities::ReportQueryBuilder
   client # Required: Google::Ads::AdWords::Client
   query_builder # Optional: the Google::Ads::AdWords::Utilities::QueryBuilder
   # to be copied
 },

METHODS

select

Adds the specified list of fields to be added to a SELECT clause.

Parameters

  • A reference to an array of fields selected.

Returns

A query builder (this instance).

from

Set the report name to be queried.

Parameters

  • A name of a report.

Returns

A query builder (this instance).

during

Sets the values of the DURING clause. If this subroutine is called, either the first argument is undef or the second and third arguments are undef.

Parameters

  • The specified date range string, e.g., YESTERDAY or when an end date is specified, this is the start date string in 'YYYYMMDD' format.

  • The end date string in 'YYYYMMDD' format.

Returns

A query builder (this instance).

build

Builds the AWQL query.

Returns

A string that is the AWQL query.