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.v202408.DeActivateCreativeWrappers.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.DeactivatePlacement.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllForecastAdjustments.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllCreatives.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllUsers.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllTeams.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllLineItems.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetLineItemsThatNeedCreatives.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetRecentlyUpdatedLineItems.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetRecentlyModifiedContent.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllNativeStyles.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllOrders.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetImageCreatives.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetOrdersStartingSoon.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetProposalsAwaitingSellerReivew.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllCreativeSets.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllTrafficForecastSegments.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetActivePlacements.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllPlacements.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAdvertisers.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllProposals.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllSites.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllCompanies.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllContacts.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllCustomFields.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetCustomFieldsForLineItems.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetUninvitedContacts.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllAdUnits.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetActiveLabels.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllContent.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllLabels.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllTargetingPresets.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllCmsMetadataKeys.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllCdnConfigurations.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllAudienceSegments.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllUserTeamAssociations.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetCmsMetadataValuesForKey.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetFirstPartyAudienceSegments.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllCreativeTemplates.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetCreativeSetsForMasterCreative.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllSuggestedAdUnits.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.ApproveSuggestedAdUnits.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.SubmitSiteForApproval.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetSystemDefinedCreativeTemplates.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllProposalLineItems.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetActiveCreativeWrappers.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllCmsMetadataValues.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetSitesRequiringApproval.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllCreativeWrappers.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetUserByEmailAddress.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllLicas.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetHighlyRequestedSuggestedAdUnits.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.RequestBuyerAcceptance.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetProposalLineItemsForProposal.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.ActivateCmsMetadataValues.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetUserTeamAssociationsForUser.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetLicasForLineItem.Run(), and Google.Api.Ads.AdManager.Examples.CSharp.v202408.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.v202408.StatementBuilder.SUGGESTED_PAGE_LIMIT = 500 |
The suggested default page size.
Referenced by Google.Api.Ads.AdManager.Examples.CSharp.OAuth.Default.OnGetUsersButtonClick(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.CreatePlacements.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetMcmEarnings.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllProgrammaticBuyers.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetLineItemsNamedLike.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.FetchMatchTables.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetAllLineItemsUsingPql.Run(), Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetGeoTargets.Run(), and Google.Api.Ads.AdManager.Examples.CSharp.v202408.GetRecentChanges.Run().