Ads API .NET library
|
A utility class that allows for statements to be constructed in parts. Typical usage is: More...
Public Member Functions | |
StatementBuilder () | |
Constructs a statement builder for partial query building. More... | |
StatementBuilder | Select (String columns) |
Sets the statement SELECT clause in the form of "a,b". Only necessary for statements being sent to the PublisherQueryLanguageService. The "SELECT " keyword will be ignored. More... | |
StatementBuilder | From (String table) |
Sets the statement FROM clause in the form of "table". Only necessary for statements being sent to the PublisherQueryLanguageService. The "FROM " keyword will be ignored. More... | |
StatementBuilder | Where (String conditions) |
Sets the statement WHERE clause in the form of More... | |
StatementBuilder | Limit (Int32 count) |
Sets the statement LIMIT clause in the form of More... | |
StatementBuilder | Offset (Int32 count) |
Sets the statement OFFSET clause in the form of More... | |
StatementBuilder | IncreaseOffsetBy (Int32 amount) |
Increases the offset by the given amount. More... | |
int | GetOffset () |
Gets the curent offset More... | |
StatementBuilder | RemoveLimitAndOffset () |
Removes the limit and offset from the query. More... | |
StatementBuilder | OrderBy (String orderBy) |
Sets the statement ORDER BY clause in the form of More... | |
StatementBuilder | AddValue (string key, string value) |
Adds a new string value to the list of query parameters. More... | |
StatementBuilder | AddValue (string key, bool value) |
Adds a new boolean value to the list of query parameters. More... | |
StatementBuilder | AddValue (string key, decimal value) |
Adds a new decimal value to the list of query parameters. More... | |
StatementBuilder | AddValue (string key, DateTime value) |
Adds a new DateTime value to the list of query parameters. More... | |
StatementBuilder | AddValue (string key, Date value) |
Adds a new Date value to the list of query parameters. More... | |
Statement | ToStatement () |
Gets the Statement representing the state of this statement builder. More... | |
Public Attributes | |
const int | SUGGESTED_PAGE_LIMIT = 500 |
The suggested default page size. More... | |
A utility class that allows for statements to be constructed in parts. Typical usage is:
StatementBuilder statementBuilder = new StatementBuilder() .Where("lastModifiedTime > :yesterday AND type = :type") .OrderBy("name DESC") .Limit(200) .Offset(20) .AddValue("yesterday", DateTimeUtilities.FromDateTime(System.DateTime.Now.AddDays(-1))) .AddValue("type", "Type"); Statement statement = statementBuilder.ToStatement(); // ... statementBuilder.increaseOffsetBy(20); statement = statementBuilder.ToStatement();
|
inline |
Constructs a statement builder for partial query building.
|
inline |
Adds a new string value to the list of query parameters.
key | The parameter name. |
value | The parameter value. |
|
inline |
Adds a new boolean value to the list of query parameters.
key | The parameter name. |
value | The parameter value. |
|
inline |
Adds a new decimal value to the list of query parameters.
key | The parameter name. |
value | The parameter value. |
|
inline |
Adds a new DateTime value to the list of query parameters.
key | The parameter name. |
value | The parameter value. |
|
inline |
Adds a new Date value to the list of query parameters.
key | The parameter name. |
value | The parameter value. |
|
inline |
Sets the statement FROM clause in the form of "table". Only necessary for statements being sent to the PublisherQueryLanguageService. The "FROM " keyword will be ignored.
table | The statement from clause without "FROM" |
|
inline |
Gets the curent offset
Referenced by Google.Api.Ads.AdManager.Examples.CSharp.v202308.DeActivateCreativeWrappers.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.DeactivatePlacement.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllCompanies.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllContacts.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllAdUnits.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetActiveLabels.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllLabels.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetUninvitedContacts.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllLineItems.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllContent.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetLineItemsThatNeedCreatives.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetRecentlyUpdatedLineItems.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllActivities.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllForecastAdjustments.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllNativeStyles.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllOrders.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetRecentlyModifiedContent.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetOrdersStartingSoon.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllCreatives.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetImageCreatives.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetActivePlacements.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllPlacements.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllCreativeSets.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetActiveActivities.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllTrafficForecastSegments.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllProposals.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetProposalsAwaitingSellerReivew.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllSites.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAdvertisers.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllTeams.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllUsers.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllCustomFields.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetCustomFieldsForLineItems.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.SubmitSiteForApproval.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetActiveCreativeWrappers.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllUserTeamAssociations.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllCmsMetadataValues.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetSystemDefinedCreativeTemplates.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllAudienceSegments.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetUserByEmailAddress.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.ApproveSuggestedAdUnits.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllProposalLineItems.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetCreativeSetsForMasterCreative.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetSitesRequiringApproval.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllCreativeWrappers.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllSuggestedAdUnits.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllCreativeTemplates.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllCdnConfigurations.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetCmsMetadataValuesForKey.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllCmsMetadataKeys.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetActiveActivityGroups.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllActivityGroups.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetFirstPartyAudienceSegments.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllTargetingPresets.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllLicas.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.RequestBuyerAcceptance.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetHighlyRequestedSuggestedAdUnits.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetProposalLineItemsForProposal.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetUserTeamAssociationsForUser.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.ActivateCmsMetadataValues.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetLicasForLineItem.Run(), and Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetForecastAdjustmentsForTrafficForecastSegment.Run().
|
inline |
Increases the offset by the given amount.
amount | the amount to increase the offset |
|
inline |
Sets the statement LIMIT clause in the form of
"LIMIT <count>"
count | the statement limit |
|
inline |
Sets the statement OFFSET clause in the form of
"OFFSET <count>"
count | the statement offset |
|
inline |
Sets the statement ORDER BY clause in the form of
"ORDER BY <property> [ASC | DESC]"
e.g. "type ASC, lastModifiedDateTime DESC". The "ORDER BY " keyword will be ignored.
orderBy | the statement order by without "ORDER BY" |
|
inline |
Removes the limit and offset from the query.
|
inline |
Sets the statement SELECT clause in the form of "a,b". Only necessary for statements being sent to the PublisherQueryLanguageService. The "SELECT " keyword will be ignored.
columns | The statement serlect clause without "SELECT". |
|
inline |
Gets the Statement representing the state of this statement builder.
|
inline |
Sets the statement WHERE clause in the form of
"WHERE <condition> {[AND | OR] <condition> ...}"
e.g. "a = b OR b = c". The "WHERE " keyword will be ignored.
conditions | The statement query without "WHERE" |
const int Google.Api.Ads.AdManager.Util.v202308.StatementBuilder.SUGGESTED_PAGE_LIMIT = 500 |
The suggested default page size.
Referenced by Google.Api.Ads.AdManager.Examples.CSharp.v202308.CreatePlacements.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetMcmEarnings.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllProgrammaticBuyers.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetLineItemsNamedLike.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.FetchMatchTables.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetAllLineItemsUsingPql.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetGeoTargets.Run(), and Google.Api.Ads.AdManager.Examples.CSharp.v202308.GetRecentChanges.Run().