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