Oracle ATG Web Commerce’s Repository Query Language, or RQL, is a generic language for formulating queries that map to any repository implementation, such as SQL or LDAP. The repository connectors translate those queries into a syntax that the underlying data store understands.
You can use RQL in several different ways:
Use RQL servlet beans in a JSP to perform repository queries:
RQLQueryForEach
andRQLQueryRange
. For detailed information about these servlet beans, see 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.RqlStatement
object. You can get anRqlQuery
object from theRqlStatement
object, then get anatg.repository.Query
object from theRqlQuery
object. This approach can be simpler than using aQueryBuilder
implementation to create aQuery
object.
This section describes the details of RQL syntax and structure.