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