Search in sources :

Example 86 with Statement

use of com.google.api.ads.admanager.axis.v202205.Statement in project googleads-java-lib by googleads.

the class StatementBuilderTest method testBindVariables_text.

@Test
public void testBindVariables_text() {
    StatementBuilder statementBuilder = new StatementBuilder();
    Statement statement = statementBuilder.where("text = :text").withBindVariableValue("text", "foo").toStatement();
    String_ValueMapEntry entry = statement.getValues(0);
    assertEquals("text", entry.getKey());
    assertEquals(TextValue.class, entry.getValue().getClass());
    assertEquals("foo", ((TextValue) entry.getValue()).getValue());
}
Also used : String_ValueMapEntry(com.google.api.ads.admanager.axis.v202202.String_ValueMapEntry) Statement(com.google.api.ads.admanager.axis.v202202.Statement) Test(org.junit.Test)

Example 87 with Statement

use of com.google.api.ads.admanager.axis.v202205.Statement in project googleads-java-lib by googleads.

the class StatementBuilderTest method testWhere_stripsWhere.

@Test
public void testWhere_stripsWhere() {
    StatementBuilder statementBuilder = new StatementBuilder();
    Statement statement = statementBuilder.where("WHERE id = 12345").toStatement();
    assertEquals("WHERE id = 12345", statement.getQuery());
}
Also used : Statement(com.google.api.ads.admanager.axis.v202202.Statement) Test(org.junit.Test)

Example 88 with Statement

use of com.google.api.ads.admanager.axis.v202205.Statement in project googleads-java-lib by googleads.

the class StatementBuilderTest method testSelect.

@Test
public void testSelect() {
    StatementBuilder statementBuilder = new StatementBuilder();
    Statement statement = statementBuilder.select("id, name").toStatement();
    assertEquals("SELECT id, name", statement.getQuery());
}
Also used : Statement(com.google.api.ads.admanager.axis.v202202.Statement) Test(org.junit.Test)

Example 89 with Statement

use of com.google.api.ads.admanager.axis.v202205.Statement in project googleads-java-lib by googleads.

the class StatementBuilderTest method testSelect.

@Test
public void testSelect() {
    StatementBuilder statementBuilder = new StatementBuilder();
    Statement statement = statementBuilder.select("id, name").toStatement();
    assertEquals("SELECT id, name", statement.getQuery());
}
Also used : Statement(com.google.api.ads.admanager.axis.v202205.Statement) Test(org.junit.Test)

Example 90 with Statement

use of com.google.api.ads.admanager.axis.v202205.Statement in project googleads-java-lib by googleads.

the class StatementBuilderTest method testWhere_stripsWhere.

@Test
public void testWhere_stripsWhere() {
    StatementBuilder statementBuilder = new StatementBuilder();
    Statement statement = statementBuilder.where("WHERE id = 12345").toStatement();
    assertEquals("WHERE id = 12345", statement.getQuery());
}
Also used : Statement(com.google.api.ads.admanager.axis.v202205.Statement) Test(org.junit.Test)

Aggregations

StatementBuilder (com.google.api.ads.admanager.axis.utils.v202205.StatementBuilder)119 Test (org.junit.Test)77 UpdateResult (com.google.api.ads.admanager.axis.v202205.UpdateResult)18 Statement (com.google.api.ads.admanager.axis.v202105.Statement)16 Statement (com.google.api.ads.admanager.axis.v202108.Statement)16 Statement (com.google.api.ads.admanager.axis.v202111.Statement)16 Statement (com.google.api.ads.admanager.axis.v202202.Statement)16 Statement (com.google.api.ads.admanager.axis.v202205.Statement)16 CustomTargetingServiceInterface (com.google.api.ads.admanager.axis.v202205.CustomTargetingServiceInterface)8 InventoryServiceInterface (com.google.api.ads.admanager.axis.v202205.InventoryServiceInterface)8 AdUnit (com.google.api.ads.admanager.axis.v202205.AdUnit)7 AdUnitPage (com.google.api.ads.admanager.axis.v202205.AdUnitPage)7 PublisherQueryLanguageServiceInterface (com.google.api.ads.admanager.axis.v202205.PublisherQueryLanguageServiceInterface)7 ResultSet (com.google.api.ads.admanager.axis.v202205.ResultSet)7 Statement (org.neo4j.driver.v1.Statement)5 String_ValueMapEntry (com.google.api.ads.admanager.axis.v202105.String_ValueMapEntry)4 String_ValueMapEntry (com.google.api.ads.admanager.axis.v202108.String_ValueMapEntry)4 String_ValueMapEntry (com.google.api.ads.admanager.axis.v202111.String_ValueMapEntry)4 String_ValueMapEntry (com.google.api.ads.admanager.axis.v202202.String_ValueMapEntry)4 CustomFieldServiceInterface (com.google.api.ads.admanager.axis.v202205.CustomFieldServiceInterface)4