OOQL language query

user or common query for object instances search


define - create new query

  query define   AdminName [user AdminName] { Query_DefineOption } [overwrite] [force];

clone - duplicate a query and set the properties / filters for the new instance

  query clone  AdminName [user AdminName] define AdminName [user AdminName] {Query_EditOption}                                     [overwrite] [force];

edit - update the query properties / filters

  query edit   AdminName [user AdminName] {Query_EditOption} [force];

show - print the query properties or filters

  query show   AdminName [user AdminName] [Query_GetOption] [Token_Option] [ExportFile_Option] ;

list - extract saved queries on the base of some filters

  query list
AdminPatternList [user AdminName] {Filter_Option} [Query_GetOption]
                                     [Token_Option] [ExportFile_Option] ;

execute - execute a saved query

  query execute  
AdminName [user AdminName] [maxitems NUMBER] [Query_Variables]                                 [Query_SaveToOption] [ Object_GetOption ] [Token_Option] [ExportFile_Option] ;

immediate
- execute a query on the fly

  query immediate
{Query_ExecuteOption} [maxitems NUMBER] [Query_Variables] [Query_SaveToOption]                                 [ Object_GetOption ] [Token_Option] [ExportFile_Option] ;

count - execute the query and count the result instance number

  query count  
AdminName [user AdminName];

  query count immediate {Query_ExecuteOption};

undefine
- remove a query from the database

  query undefine AdminName [user AdminName] ;


Query_DefineOption
description GenericValue
application AdminName
image  FileName
imagedata GenericString
Query_ExecuteOption
[! /not] hidden

Query_EditOption
name AdminName
description GenericValue
application AdminName
image  FileName
imagedata GenericString
objclass AdminPatternList
objname GenericPatternList
objrevision GenericPatternList
Query_ExecuteOption
[! /not] hidden

Query_ExecuteOption
object AdminPatternList GenericPatternList GenericPatternList
objdescr  AdminNamePattern
holder AdminPatternList
lifecycle AdminPatternList
stage AdminPatternList
objectspace AdminPatternList
filter FilterExpression

Query_Variables
vars VARIABLE = GenericValue { VARIABLE = GenericValue }

Query_SaveToOption
objectgroup AdminName [ user AdminName ] [ overwrite ]

Query_GetOption
get [Query_GetBasicOption]
   
  Query_GetBasicOption
  { Query_GetBasicToken [as IDENTIFIER] { Query_GetBasicToken [as IDENTIFIER] } }
  Query_GetBasicToken [as IDENTIFIER]
     
    Query_GetBasicToken
    Common_GetBasicOption  
    user  
    objclass  
    objname  
    objrevision  
    objdescr  
    lifecycle  
    stage  
    holder  
    objectspace  
    filter  


KEYWORDs
application the associated application menu
description the query description
filter represents a "where" expression for the OOQL query
force this flag allows to ignore errors during the creation/update
holder condition to filter the objects on the base of their associated holder
hidden hidden queries are not visible/usable
image local path for the query icon to upload
imagedata base64 code for the query icon
lifecycle condition to filter the objects on the base of their current lifecycle
maxitems maximum number of returned search results
moddate last modification date
name the query name
object conditions to filter the objects on the base of their class / name / revision
objtclass condition to filter the objects on the base of their class
objdescr condition to filter the objects on the base of their description
objectgroup add search result objects to a objectgroup
objectspace condition to filter the objects on the base of the objectspace
objname condition to filter the objects on the base of their name
objrevision condition to filter the objects on the base of their revision
overwrite drop the form if exists before to create the new one
stage condition to filter the objects on the base of their current stage
user the owner of the saved query
vars replace the variables with values in a predefined (saved) query


SAMPLES


query define QY01 object CL*,V* Part* 00 objectspace OS?? ;

query clone QY01 user User2 define QY02 holder User* ;

query execute QY01 maxitems 15 objectgroup OGXX overwrite get { class name revision } token xml ;

query immediate object CL* * - objectspace OS03 filter ( field[ATTR10] == "value*01" ) maxitems 40 get { id description } token '|';


common syntax

Common_GetBasicOption
Common_GetBasicToken [ as IDENTIFIER ]

Common_GetBasicToken
id  
name  
origdate  
moddate  
moduser  
description  
svnrev  
hidden  
image  
imagedata  
feature[ AdminName ] [. Feature_GetBasicOption]
feature[] [. Feature_GetBasicOption]
feature [. Feature_GetBasicOption]
application [. Menu_GetBasicOption]
super  
admintype  

Edit_Operator
add
remove

Edit_RefOperator
addbefore AdminName set
addafter AdminName set
add
remove
movebefore
moveafter

Edit_AddOperator
addbefore AdminName define
addafter AdminName define
append

Edit_MoveOperator
movebefore
moveafter

Event_Type
action
check

AdminPatternList
AdminNamePattern {, AdminNamePattern}

AdminNamePattern
*
PATTERNIDENTIFIER
STRINGVAL
AdminName

GenericPatternList
GenericPattern {, GenericPattern}

GenericPattern
*
IDENTIFIER
PATTERNIDENTIFIER
GenericValue

AdminActor
user AdminName
team AdminName
assignment AdminName

AdminName
IDENTIFIER
QUOTED_STRING
SQUOTED_STRING

GenericValue
DATETIME
GenericNumber
GenericString
BOOLEANVAL

GenericString
STRINGVAL
QUOTED_STRING
SQUOTED_STRING

GenericNumber
NUMBER
REALNUMBER

Filter_Option
moddate Date_Range
application AdminNamePattern

Date_Range
=  DATETIME  
!= DATETIME
 
<  DATETIME
 
>  DATETIME
 
<= DATETIME
 
>= DATETIME
 
in [ DATETIME , DATETIME ]
 
in ( DATETIME , DATETIME ]
 
in [ DATETIME , DATETIME )
 
in ( DATETIME , DATETIME )  

Token_Option
token { Token_Separator { Token_Separator } }
token Token_Separator

Token_Separator
QUOTED_STRING
SQUOTED_STRING
IDENTIFIER
STRINGVAL
json
json-
json+
xml
xml-
xml+

ExportFile_Option
exportfile FileName [append] [xml | json ]

ImportFile_Option
importfile FileName [xml | json |emxxml]

LogFile_Option
logfile FileName [append]

FileName
QUOTED_STRING
SQUOTED_STRING

basic elements
grammar rules
[ ] = optional element - only one item is allowed : ( 0 or 1 )
{ } = optional element - more than one is allowed : ( 0 or N )
/ = alternative
= one of ...
   
  all bold texts represent keywords or command syntax

IDVAL
#<5 dec digits [ 0-9 ]>-<8 hex digits [ 0-9 A-F ]>
  example:
  #00020-34F2A80E

COMMENT
// <any character until the end of the line(\n \r)>
  example:
  // My single line comment

LONGCOMMENT
/* <any character> */
 

example:
  /* My multi line comment starts here
  continue here
  and finish here */


DATETIME
<year 4 digits>[ - /. ]<month 2 digits>[ - /. ]<day 2 digits>
  examples:
   2009-12-23    2009/03/19   2009.11.14
<year 4 digits>[ - /. ]<month 2 digits>[ - /. ]<day 2 digits> <hours>:<minutes>:[<seconds>]
  examples:
   2009-12-23 10:23   2009/03/19 16:03:34  2009.11.14 00:20:04

NUMBER
[+-]<decimal digits [ 0-9 ]>
  examples:
   -1203   +276   25

BOOLEANVAL
true / false

REALNUMBER
[+-]<decimal digits [ 0-9 ]>.<decimal digits [ 0-9 ]>[E(+-)<esponent [0-9]>]
  example:
   -37.837   +2.3874   13.887   1.4862E-04

QUOTED_STRING
"<any character>"
  example:
   "my quoted string"

SQUOTED_STRING
'<any character>'
  example:
   'my single quoted string'

IDENTIFIER
<one or more of [ a-z A-Z ]><zero or more of [ a-z A-Z 0-9 _ ]>
  example:
   Var1    object_Name_02

VARIABLE
$<one o more of [ a-z A-Z 0-9 ]><zero or more of [ a-z A-Z 0-9 _ ]>
 

example:
   $1   $var_02    $1b


STRINGVAL
<one or more of [ a-z A-Z 0-9 -_ $ ? @ | ~ % & / = : + \ # ' ]>
  a string not recognized as identifier

PATTERNIDENTIFIER
<a string with * (match 0 or more characters) and ? (match 1 character) wildcards>
  example:
   mypa*er?_ide?ti*

© 2008-2015 MS Enterprise Solutions | Website Templates by IceTemplates.com
Please Read: Privacy Policy and Terms of Use