Query Format

Back  Next TOC

             Any virtual directory can be associated with an query which acts on the extended attributes of the files present on the object store. These queries can be specified at the DOV file creation time or while creating new directories are created under an already mounted View.

==========================================================

Valid Queries can Best explained using a Context Free Grammer with the following Rules

S->DIRNAME~QUERY

DIRNAME->([a-z][1-0])* not containig space

QUERY -> SUBQUERY~SUBQUERY | NULL

SUBQUERY ->OPERATOR<space>DATATYPE<space>FIELDNAME<space>FIELDOPERATOR<FILEDVALUE>

OPEARTOR-> and|or|not

DATATYPE-> Text|Num|Date|Boolean

FIELDOPERATOR-> REGEXP | LIKE | <=  | >= | < |  > | = | !=

                      Note: the operator must be valid in the context of the datatype provided in the subquery

that is for Ex REGEXP cannot be present when datatype in not Text.

FIELDNAME-> "any string combination coressponding to and fieldname to be compared Cannot contain spaces"

FIELDVALUE-> "any string which need to be compared against the fieldname in the subquery"

==========================================================

                    For those who don't understand the details of CFG the following examples may be useful

Example 1: A Directory with all C files starting with the letter 'F' create Directory name

CFilesStartWithF~AND Text type like c~AND Text filename like REGEXP ^[f|F]

Example 2: A directory with all the Images on the object store

Images~AND Text type like REGEXP [gif|jpg|jpeg|pcx|bmp|jpeg]

Example 3: A Directory with all Resumes of people living in City Pune

Resume_candidate_pune~AND Text type like doc~AND Text Address like %PUNE%

==========================================================

NOTE: If you are planning to write to your own DOV file generator REPLACE the '~' character with the tab '\t' character in the grammer mention above. A stupid Restriction which will be lifted in the near Future.

 

 Back Next  TOC