Changes between Version 7 and Version 8 of ScriptableInterface


Ignore:
Timestamp:
Dec 3, 2012, 1:05:32 PM (12 years ago)
Author:
manualwiki
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ScriptableInterface

    v7 v8  
    117117 
    118118== Operators == 
    119  
    120119The result of the queries can be combined with the following set operators: \\ 
    121120* '''intersect''': The following example takes the intersection of the files included by the two modules. 
     
    131130* '''minus''': The substraction set operation. (Example: same as above, just substitute 'intersect' with 'minus') \\ 
    132131 
    133 * '''Sequence''': Queries can be sequenced to continue a query from where another has left off. This example first adds the module from file 'mymodule.erl'. The add call returns the entities loaded. A semantic query aggregate of a list works by executing the first query (or in this case, specifying a starting entity), and then running the next query in the chain (in this case getting the name of files included by the add call). 
     132* '''Sequence''': Queries can be sequenced to continue a query from where another has left off. The execution works on arbitrarily long starting and continuation sequences (i.e., not just a single element). The following examples are correct, and can be used from {{{ris}}}: 
     133 
     134{{{ 
     135#!erlang 
     136 
     137% Language elements can be written via atoms or via strings. The dot is optional. 
     138ris:q([mods, funs]). 
     139ris:q([mods, .funs]). 
     140ris:q(["mods", "funs"]). 
     141 
     142% Filters can be sequenced. 
     143ris:q(['mods', '[name==a]']). 
     144 
     145% Statistics can be sequenced. 
     146ris:q(['mods', '.fun', '.arity', ':sum']). 
     147ris:q(["mods", "funs", "arity", ":avg"]). 
     148}}} 
     149 
     150 Sequences can be constructed not only between queries parts, but between a basic {{{ris}}} command and query parts, too.  
     151 This example first adds the module from file 'mymodule.erl'. The add call returns the entities loaded.  
     152 A semantic query aggregate of a list works by executing the first query (or in this case, specifying a starting entity),  
     153 and then running the next query in the chain (in this case getting the name of files included by the add call). 
    134154 
    135155{{{