use of com.google.api.ads.admanager.jaxws.v202205.Statement in project googleads-java-lib by googleads.
the class StatementBuilderTest method testLimit.
@Test
public void testLimit() {
StatementBuilder statementBuilder = new StatementBuilder();
Statement statement = statementBuilder.limit(500).toStatement();
assertEquals("LIMIT 500", statement.getQuery());
}
use of com.google.api.ads.admanager.jaxws.v202205.Statement in project googleads-java-lib by googleads.
the class StatementBuilderTest method testRemoveLimitAndOffset.
@Test
public void testRemoveLimitAndOffset() {
StatementBuilder statementBuilder = new StatementBuilder();
Statement initialOffset = statementBuilder.where("id = 1").limit(100).offset(100).toStatement();
assertEquals("WHERE id = 1 LIMIT 100 OFFSET 100", initialOffset.getQuery());
Statement removed = statementBuilder.removeLimitAndOffset().toStatement();
assertEquals("WHERE id = 1", removed.getQuery());
}
use of com.google.api.ads.admanager.jaxws.v202205.Statement in project googleads-java-lib by googleads.
the class StatementBuilderTest method testFrom.
@Test
public void testFrom() {
StatementBuilder statementBuilder = new StatementBuilder();
Statement statement = statementBuilder.from("line_item").toStatement();
assertEquals("FROM line_item", statement.getQuery());
}
use of com.google.api.ads.admanager.jaxws.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());
}
use of com.google.api.ads.admanager.jaxws.v202205.Statement in project googleads-java-lib by googleads.
the class StatementBuilderTest method testOrderBy.
@Test
public void testOrderBy() {
StatementBuilder statementBuilder = new StatementBuilder();
Statement statement = statementBuilder.orderBy("id ASC").toStatement();
assertEquals("ORDER BY id ASC", statement.getQuery());
}
Aggregations