13.4. Direct SQL Execution

Kodo JDO Enterprise Edition allows you to execute SQL selects and stored procedures directly through the JDO query interface, retrieving matching objects or column projections rather than a low-level ResultSet. SQL queries can only be executed in the database; if you attempt to execute a SQL query under conditions that require in-memory evaluation, Kodo will throw an error.

SQL queries are documented in detail the JDO Overview's Chapter 12, SQL Queries. Also, the StoredProcMain driver program in the samples/ormapping directory of your Kodo distribution demonstrates a working SQL query.