\Google\AdsApi\AdWords\Query\v201809ServiceQueryBuilder

Builds an AWQL string for querying AdWords SOAP services.

Summary

Methods
Properties
Constants
__construct()
copyFrom()
select()
where()
orderByAsc()
orderByDesc()
limit()
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

copyFrom()

copyFrom(\Google\AdsApi\AdWords\Query\v201809\ServiceQueryBuilder  $otherInstance): \Google\AdsApi\AdWords\Query\v201809\ServiceQueryBuilder

Creates a new query builder object by copying each clauses from another query builder object.

Parameters

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

the other query builder object for copying its clauses

Returns

\Google\AdsApi\AdWords\Query\v201809\ServiceQueryBuilder

a new builder object that copies from the input one

select()

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

Sets the fields for the SELECT clause. Repeated field names will be included exactly once.

Parameters

array $fields

the fields for building the SELECT clause

Returns

\Google\AdsApi\AdWords\Query\v201809\ServiceQueryBuilder

the current instance of ServiceQueryBuilder for chaining

where()

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

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\ServiceQueryWhereBuilder

a builder object for building the WHERE clause

orderByAsc()

orderByAsc(string  $field): \Google\AdsApi\AdWords\Query\v201809\ServiceQueryBuilder

Adds a field name with the ascending direction (ASC) to the ORDER BY clause.

Parameters

string $field

a field name to be added to the ORDER BY clause

Returns

\Google\AdsApi\AdWords\Query\v201809\ServiceQueryBuilder

the current instance of ServiceQueryBuilder for chaining

orderByDesc()

orderByDesc(string  $field): \Google\AdsApi\AdWords\Query\v201809\ServiceQueryBuilder

Adds a field name with the descending direction (DESC) to the ORDER BY clause.

Parameters

string $field

a field name to be added to the ORDER BY clause

Returns

\Google\AdsApi\AdWords\Query\v201809\ServiceQueryBuilder

the current instance of ServiceQueryBuilder for chaining

limit()

limit(integer  $startIndex,integer  $pageSize): \Google\AdsApi\AdWords\Query\v201809\ServiceQueryBuilder

Sets the start index and page size for the LIMIT clause.

Parameters

integer $startIndex

the start index of the first page

integer $pageSize

the count of entries to be fetched in each page

Returns

\Google\AdsApi\AdWords\Query\v201809\ServiceQueryBuilder

the current instance of ServiceQueryBuilder for chaining

build()

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

Builds a new `ServiceQuery` object.

Throws

\RuntimeException

if the select() function was not called prior to this function

Returns

\Google\AdsApi\AdWords\Query\v201809\ServiceQuery

a new ServiceQuery object