19. Jinq
• Initially developed by Dr. Ming-Yee
• Open-source project
• Functional database queries in Java and Scala
• Inspired by LINQ
• Required JPA & Java 8
20. Jinq flow
• Translated Java code and Run it as database query
statements
• Run as ordinary Java code
39. Pairs
select city.id, country.id, city.countryId, city.name,
city.population, country.name from City city inner join
Country country on city.countryId=country.id limit ?
41. Grouping
• select city.countryId, sum(city.population),
count(city.id), country.id, country.name from City
city inner join Country country on city.countryId=
country.id group by city.countryId limit ?
42. Limitations
• Your code cannot contain any loops
• Your code can call other methods but only those
from a restricted list with known side-effects
• Your code can read and modify local variables
(since these changes will be discarded once the
function exits)
• Your code can read but not modify non-local
variables
• Your code cannot contain casting between
different data types