This supports sending queries to the FileManager in form of
SELECT [Elements] FROM [ProductTypes] WHERE [where-clause], where:
- [Elements]: is a comma separated list of Element names; may also be * which
represents all Elements
- [ProductTypes]: is a comma separated list of ProductType names; may also
be * which represents all ProductTypes
- [where-clause]: is an optional Element name filter supporting the following:
* AND and OR boolean operators
* () grouping of queries
* element-name == 'element-value'
* element-name < 'element-value'
* element-name > 'element-value'
* element-name <= 'element-value'
* element-name >= 'element-value'"
An additional post-query FilterAlgor can also be specified where you specify
which Metadata fields which should be used as each Product's StartDateTime,
EndDateTime, and Priority values
(Assume you have a ProductType, GenericFile, which supports the
Elements: Filename, NominalDate, Group, and DataVersion)
$ ./filemgr-client -u http://localhost:9000 -op -sql
-q "SELECT Filename FROM GenericFile WHERE (NominalDate == '2011-20-10' OR
NominalDate == '2011-20-11') AND Group == 'Test' AND DataVersion > '1.0'"
(Returns all Products in FileManager -- use with care)
$ ./filemgr-client -u http://localhost:9000 -op -sql -q "SELECT * FROM *"