Warning: Use of undefined constant Symbol - assumed 'Symbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215 Warning: Use of undefined constant JavaScriptSymbol - assumed 'JavaScriptSymbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215

dojo/store/util/SimpleQueryEngine.js

  • Provides:

    • dojo.store.util.SimpleQueryEngine
  • dojo.store.util.SimpleQueryEngine

    • parameters:
      • query: (typeof Object)
        An object hash with fields that may match fields of items in the store.
        Values in the hash will be compared by normal == operator, but regular expressions
        or any object that provides a test() method are also supported and can be
        used to match strings by more complex expressions
        (and then the regex's or object's test() method will be used to match values).
      • options: (typeof dojo.store.util.SimpleQueryEngine.__queryOptions)
        An object that contains optional information such as sort, start, and count.
    • summary
      Simple query engine that matches using filter functions, named filter
      functions or objects by name-value on a query object hash
    • description
      The SimpleQueryEngine provides a way of getting a QueryResults through
      the use of a simple object hash as a filter.  The hash will be used to
      match properties on data objects with the corresponding value given. In
      other words, only exact matches will be returned.
      
      This function can be used as a template for more complex query engines;
      for example, an engine can be created that accepts an object hash that
      contains filtering functions, or a string that gets evaluated, etc.
      
      When creating a new dojo.store, simply set the store's queryEngine
      field as a reference to this function.
    • return_summary
      Function
      A function that caches the passed query under the field "matches".  See any
      of the "query" methods on dojo.stores.
    • example
      Define a store with a reference to this engine, and set up a query method.
      
      	var myStore = function(options){
      		//	...more properties here
      		this.queryEngine = dojo.store.util.SimpleQueryEngine;
      		//	define our query method
      		this.query = function(query, options){
      			return dojo.store.util.QueryResults(this.queryEngine(query, options)(this.data));
      		};
      	};
    • type
      Function
  • dojo.store.util

    • type
      Object
  • dojo.store

    • type
      Object
  • dojo

    • type
      Object