DoneJS StealJS jQuery ++ FuncUnit DocumentJS
3.0.0
2.3.27

 

  • Github
  • Twitter
  • Chat
  • Forum
  • Guides
  • Core
    • can-component
    • can-compute
    • can-connect
      • behaviors
        • ./base/
        • ./cache-requests/
        • ./can/map/
        • ./can/ref/
        • ./constructor/callbacks-once/
        • ./constructor/
        • ./constructor/store/
        • ./data/callbacks/
        • ./data/callbacks-cache/
        • ./data/combine-requests/
          • types
            • PendingRequest
          • options
            • time
          • data methods
            • getListData
          • algebra methods
            • getSubset
            • unionPendingRequests
        • ./data/localstorage-cache/
        • ./data/memory-cache/
        • ./data/parse/
        • ./data/url/
        • ./data/worker/
        • ./fall-through-cache/
        • ./real-time/
      • modules
        • ./can/base-map/
        • ./can/model/
        • ./can/super-map/
        • ./can/tag/
        • ./helpers/weak-reference-map
      • data types
        • DataInterface
        • Instance
        • InstanceInterface
        • List
        • ListData
    • can-define
    • can-define/list/list
    • can-define/map/map
    • can-route
    • can-route-pushstate
    • can-set
    • can-stache
    • can-stache/helpers/route
    • can-stache-bindings
  • Ecosystem
  • Infrastructure
  • Legacy
  • Bitovi
    • Bitovi.com
    • Blog
    • Consulting
    • Training
    • Open Source
  • Chat
  • Forum
  • Star
  • Follow @canjs
  • CanJS
  • /
  • Core
  • /
  • can-connect
  • /
  • ./data/combine-requests/
  • /
  • unionPendingRequests
  • / On this page
    • unionPendingRequests

      function
      • source

      connection.unionPendingRequests( pendingRequests )

      Parameters

      1. undefined {Array<PendingRequest>}:

        An array of objects, each containing:

        • set - the requested set
        • deferred - a deferred that will be resolved with this sets data

      Returns

      {Array<Object>}:

      Returns an array of each of the unioned requests to be made. Each unionized request should have:

      • set - the set to request
      • pendingRequests - the array of pending requests the set satisfies.

      Use

      This function gets called automatically. However, it converts something like:

      [
        {set: {completed: false}, deferred: def1},
        {set: {completed: true}, deferred: def2}
      ]
      

      to

      [
        {
         set: {},
         pendingRequests: [
           {set: {completed: false}, deferred: def1},
           {set: {completed: true}, deferred: def2}
         ]
        }
      ]
      

      CanJS is part of DoneJS. Created and maintained by the core DoneJS team and Bitovi. Currently 3.0.0.