November 2018
Beginner to intermediate
260 pages
6h 12m
English
Apache Ignite supports custom SQL functions to perform utility tasks. The @QuerySqlFunction Java annotation makes a Java method a SQL function. You can call the function from your ANSI-99 SQL queries. In this section, we are going to write a custom SQL function to convert strings. The steps are as follows:
class Country { @QuerySqlField(index = true) private long id; @QuerySqlField(index = true) private String name; private long population; public Country(long id, String name, long population) { super(); this.id = id; this.name = name; this.population = population; } @Override public String toString() { return "Country [id=" + id + ", name=" + name + ", population=" ...Read now
Unlock full access