Changes between Version 20 and Version 21 of SemanticQuery


Ignore:
Timestamp:
Jan 2, 2014, 3:17:59 PM (11 years ago)
Author:
manualwiki
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SemanticQuery

    v20 v21  
    8484 
    8585Atoms, strings, integers and properties can be used in comparisons.  
    86 The language uses {{{/=, ==, >=, =<, <, >}}} and {{{~}}}.  
     86The language uses {{{/=, ==, >=, =<, <, >, ~}}} and {{{in}}}.  
    8787The results of comparisons are the same as in Erlang.  
    8888The resulting expressions can be combined by {{{and}}}, {{{or}}}, and {{{not}}} operators, and parentheses can be used, too.  
    8989The {{{~}}} operator is a regular expression matching operator, and it can be used anywhere, 
    90  where other binary comparison operators can be used. The same expressions can be used, which can be used in the {{{re}}} module. 
     90where other binary comparison operators can be used. The same expressions can be used, which can be used in the {{{re}}} module. 
     91The {{{in}}} operator is similar to the {{{in}}} operator defined in SQL. To illustrate its usage, consider the following 2 semantic queries, 
     92which are semantically equivalent with each other. 
     93 * mods.funs[name = a or name = b or name = c] 
     94 * mods.funs[name in |a,b,c|] 
    9195 
    9296The operator precedence for the filters is as follows: 
     
    9599||{{{not}}} ||unary ||  
    96100||{{{/=, ==, >=, =<, <, >, =:=, =/=, ~}}} ||left associative ||  
     101||{{{in}}} ||left associative || 
    97102||{{{and}}} ||left associative || 
    98103||{{{or}}} ||left associative || 
     
    111116}}} 
    112117 
     118''Example:'' you may be interested in all the module, whose name equals with one element of the following set : {a,b,c} 
     119{{{ 
     120mods[ name in |a,b,c| ] 
     121}}} 
    113122 
    114123==== Embedded queries ====