Service Registry 3.1 User's Guide

ProcedureTo Create and Publish an AdhocQuery Object

An AdhocQuery object represents an ad hoc query expressed in a query syntax. AdhocQuery objects are used for discovery of registry objects. AdhocQuery objects are similar in purpose to the concept of stored procedures in relational databases. For example, the predefined queries in the Search panel are all AdhocQuery objects.

  1. Execute Steps 1–6 in To Create and Publish a New Registry Object. In Step 2, select AdhocQuery.

  2. (Optional) Select a query type from the Query Type combo box.

    The default is SQL Query. Other supported query types are XQuery and ebXML Filter Query.

  3. Type the text of the query in the Query String field.

    For a SQL query, use pairs of single quotes to enclose items that you normally enclose in single quotes. These items are typically parameter placeholders and literals, when they occur in subqueries. For example, specify a parameter placeholder in a subquery as follows:

    (SELECT id FROM ClassificationNode WHERE path LIKE ''$objectTypePath'')

    Specify both a literal and a parameter placeholder as follows:

    ... AND (ro.id = s.parent AND s.name_ = 
    ''urn:oasis:names:tc:ebxml-regrep:profile:ws:wsdl:nameSpacesUsed''
      AND s.value LIKE ''$nameSpacePattern'')
  4. Execute Steps 8–10 in To Create and Publish a New Registry Object.