DAF provides a generic language for formulating queries. Because these queries must 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:
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.Define an RQL filter that is implicitly applied to all queries performed by the repository. See Repository Filtering in the SQL Repository Queries chapter.
Include RQL queries in
<query-items>tags in the XML repository definition file. This is mainly useful for unit testing queries; it can also be used to preload repository caches. See Querying Items in the Developing and Testing an SQL Repository chapter and Preloading Caches in the SQL Repository Caching chapter.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.

