DAF provides a generic language for formulating queries. Because these queries must be able to map to any repository implementation, the queries cannot be expressed in terms of any one back-end implementation (such as SQL or LDAP query syntax). Instead, the queries must be expressed in Repository Query Language (RQL), and the individual repository connectors are responsible for translating those queries into the query syntax expected by the underlying data store.
You can use RQL in several different ways:
You can use RQL servlet beans to perform RQL queries in a page. DAF includes two RQL servlet bean classes,
atg.repository.servlet.RQLQueryForEach(Nucleus address/atg/dynamo/droplet/RQLQueryForEach) andatg.repository.servlet.RQLQueryRange(Nucleus address/atg/dynamo/droplet/RQLQueryRange). See the descriptions of these servlet beans in Appendix B: ATG Servlet Beans in the ATG Page Developer's Guide.You can define an RQL filter that is implicitly applied to all queries performed by the repository. See Repository Filtering in the SQL Repository Queries chapter.
You can include RQL queries in
<query-items>tags in the XML repository definition file. This is useful principally for unit testing queries, but can also be used to pre-load repository caches. See Querying Items in the Development, Testing and Debugging with the SQL Repository chapter and Cache Loading in the SQL Repository Caching chapter.You can use RQL directly by creating an
atg.repository.rql.RqlStatementobject. You can get anRqlQueryobject from theRqlStatementobject, and in turn get anatg.repository.Queryobject from theRqlQueryobject. This approach can be simpler than using theQueryBuilderclass to create theQueryobject.
This section describes the details of RQL syntax and structure.

