Merging pureQueryXML files by using a base file

Use a pureQueryXML file as a base file when you want the file that results from the merge to preserve the statement sets from that file. SQL statements from the other files in the merge go into an unnamed statement set that pureQuery creates at the end of the resulting file.

About this task

For example, you might capture SQL statements from an application in a file called capture.pdqxml. You edit this file by arranging it into the statement sets that you want. You then give copies of this file to other members of your team so that they can incrementally capture statements from other logical paths in the same application. Each member uses their copy as an input file, specifying the file as the value of the pureQueryXml property. Each member sets the value of the outputPureQueryXml property to the name of the file to contain the additional SQL statements that they capture.

Those team members give you their output files, which you include in your Java™ project. You open the original pureQueryXML file for editing, right-click in it, and select Merge with. You then select the files that your team members gave you.

When you open the new file for editing, the workbench runs the Configure utility on it before opening it in the editor. The file contains the named statement sets that were in the base file. The SQL statements that were in unnamed statement sets in the base file and that were in the other files that participated in the merge process are in one or more new, named statement sets.

Procedure

In a file that you are editing and that you just saved, follow these steps:

  1. Right-click anywhere in the editor and select Merge with.
  2. In the Select window, select the other files that you want to merge the current file with. These contributing files can also be open for editing; however, you must save them before you can merge them with the current file.

    The workbench expects all of the files to be in the same folder, whether a folder in your Java project or a folder elsewhere on the file system.

  3. Click OK.
  4. In the Save window, specify both the location in which you want to save the new file and a name for the file.
  5. Click Save.

    The editor creates the file. If the file is in the pureQueryFolder folder of your Java project, move the original pureQueryXML files out of that folder and then refresh the SQL Outline view. If you leave the original files in the pureQueryFolder folder, the SQL Outline shows the SQL statements in those files, in addition to the SQL statements that are in the file that resulted from the merge.


Feedback