use of com.google.api.ads.admanager.jaxws.v202108.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.v202108.Statement in project googleads-java-lib by googleads.
the class StatementBuilder method toStatement.
/**
* Gets the {@link Statement} representing the state of this statement builder.
*
* @return the {@link Statement}
*/
public Statement toStatement() {
Statement statement = new Statement();
statement.setQuery(queryBuilder.buildQuery());
statement.setValues(Maps.toList(queryBuilder.getBindVariableMap(), String_ValueMapEntry.class).toArray(new String_ValueMapEntry[] {}));
return statement;
}
use of com.google.api.ads.admanager.jaxws.v202108.Statement in project googleads-java-lib by googleads.
the class StatementBuilder method toStatement.
/**
* Gets the {@link Statement} representing the state of this statement builder.
*
* @return the {@link Statement}
*/
public Statement toStatement() {
Statement statement = new Statement();
statement.setQuery(queryBuilder.buildQuery());
statement.getValues().addAll(Maps.toList(queryBuilder.getBindVariableMap(), StringValueMapEntry.class));
return statement;
}
use of com.google.api.ads.admanager.jaxws.v202108.Statement in project googleads-java-lib by googleads.
the class StatementBuilder method toStatement.
/**
* Gets the {@link Statement} representing the state of this statement builder.
*
* @return the {@link Statement}
*/
public Statement toStatement() {
Statement statement = new Statement();
statement.setQuery(queryBuilder.buildQuery());
statement.getValues().addAll(Maps.toList(queryBuilder.getBindVariableMap(), StringValueMapEntry.class));
return statement;
}
use of com.google.api.ads.admanager.jaxws.v202108.Statement in project googleads-java-lib by googleads.
the class StatementBuilderTest method testSelect_stripsSelect.
@Test
public void testSelect_stripsSelect() {
StatementBuilder statementBuilder = new StatementBuilder();
Statement statement = statementBuilder.select("SELECT id, name").toStatement();
assertEquals("SELECT id, name", statement.getQuery());
}
Aggregations