16.10.2015 Views

Getting Startedwith pureQuery

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

356<br />

<strong>Getting</strong> Started with <strong>pureQuery</strong><br />

All of the options for an entry must be on a single line; that is, a line break signals the<br />

beginning of the next entry. For each line, all of the characters to the left of the equal sign<br />

are considered part of the interface or <strong>pureQuery</strong>Xml file name, so do not include any<br />

quotation marks or other characters that you do not want to be part of the name. The<br />

options and values to the right of the equal sign are space-separated, just as they are on<br />

the command line. Therefore, to the right of the equal sign, if the value of an option<br />

contains a space, you must surround the value in double quotes.<br />

In genProps files, you can only provide one entry for each interface or <strong>pureQuery</strong>Xml file.<br />

You can provide multiple entries for the interfaces and <strong>pureQuery</strong>Xml files that are in a<br />

bindProps file, however. It does not make sense to allow duplicate entries in genProps<br />

files, since the Generator utility and the Configure utility would repeatedly create or modify<br />

the same file. On the other hand, it makes sense for the StaticBinder utility to process a<br />

single interface or <strong>pureQuery</strong>Xml file more than once; for example, you might want to bind<br />

the SQL in one interface or file in multiple database servers.<br />

Listing E.18.2 shows how you could specify two interfaces, two <strong>pureQuery</strong>Xml files, and<br />

one statement set of a third <strong>pureQuery</strong>Xml file in an options file. You can specify specific<br />

statement sets only for the StaticBinder utility, so the last line of the listing is only valid in a<br />

bindProps file.<br />

myPackage1.MyInterface1 = <br />

myPackage1.MyInterface2 = <br />

C:\path1\captureFile1.pdqxml = <br />

C:\path2\captureFile2.pdqxml = <br />

C:\path3\captureFile3.pdqxml:MYPKGA = <br />

Listing E.18.2 - Example of listing interfaces and <strong>pureQuery</strong>Xml files in an options<br />

file<br />

Additionally, in each options file, you can provide default options on a line that starts with<br />

defaultOptions. <strong>pureQuery</strong> uses each option that you specify on the<br />

defaultOptions line for all the items, except for those items where the option is<br />

specified with a different value. You can only specify one line that starts with<br />

defaultOptions. Listing E.18.3 shows how you could specify these options.<br />

defaultOptions = <br />

Listing E.18.3 - Example of listing defaultOptions in an options file<br />

In addition to lines of options, you can have comments in an options file. Use the #<br />

character to designate lines as comments, as in Listing E.18.4:<br />

# This line is a comment<br />

Listing E.18.4 - Example of a comment in an options file<br />

If you run a utility from the command line and specify an options file, you can specify some<br />

of the options on the command line as well. When you specify an option both on the

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!