use of com.google.api.ads.admanager.jaxws.v202205.Statement in project sunbird-rc-core by Sunbird-RC.
the class Neo4jGraphProvider method createCompositeIndex.
@Override
public void createCompositeIndex(Graph graph, String label, List<String> propertyNames) {
Neo4JGraph neo4jGraph = (Neo4JGraph) graph;
if (propertyNames.size() > 0) {
StringBuilder properties = new StringBuilder(String.join(",", propertyNames));
logger.info("composite key properties values " + properties);
Objects.requireNonNull(label, "label cannot be null");
Objects.requireNonNull(properties, "properties cannot be null");
neo4jGraph.execute(new Statement("CREATE INDEX ON :`" + label + "`(" + properties + ")"));
} else {
logger.info("Could not create composite index for empty properties");
}
}
use of com.google.api.ads.admanager.jaxws.v202205.Statement in project eol-globi-data by jhpoelen.
the class CypherQueryExecutorIT method executeBoltQuery.
@Test
public void executeBoltQuery() {
Driver driver = GraphDatabase.driver("bolt://preston:7687", AuthTokens.none());
Session session = driver.session(AccessMode.READ);
try (Transaction transaction = session.beginTransaction()) {
String s = "CYPHER 2.3 START dataset = node:datasets({namespace}) RETURN dataset.namespace LIMIT 1";
Statement statement = new Statement(s, new TreeMap<String, Object>() {
{
put("namespace", "namespace:\"globalbioticinteractions/template-dataset\"");
}
});
StatementResult run = transaction.run(statement);
run.stream().map(r -> r.asMap()).forEach(System.out::println);
transaction.success();
}
}
use of com.google.api.ads.admanager.jaxws.v202205.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.v202205.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.v202205.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;
}
Aggregations