JDOQL est le langage d'interrogation spécifié par la norme JDO (Java Data Object). Le langage reprend la syntaxe de Java. Il prend en compte l'héritage et permet une navigation très simple.

Exemple 1 de requête JDOQLModifier

  • JDOQL
  Employee.class, “salary>boss.salary”
  • Equivalent SQL
  SELECT Employee.*
  FROM Employee INNER JOIN Employee AS Boss ON Employee.boss = Boss.ID
  WHERE ((Employee.salary)>[boss].[salary]);

Exemple 2 de requête JDOQLModifier

  • JDOQL
  Employee.class, “(salary>boss.salary) && (adr.city==boss.adr.city)”
  • Equivalent SQL
  SELECT Employee.*
  FROM ((Employee INNER JOIN Employee AS Boss ON Employee.boss = Boss.ID) INNER JOIN Address AS AddressEmployee ON Employee.adr = AddressEmployee.ID) 
  INNER JOIN Address AS       AddressBoss ON Boss.adr = AddressBoss.ID
  WHERE (((Employee.salary)>[boss].[salary]) AND ((AddressEmployee.City)=[AddressBoss].[City]));