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/
        • ./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
          • clear
          • createData
          • destroyData
          • getData
          • getListData
          • getSets
          • updateData
          • updateListData
        • 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
  • /
  • DataInterface
  • /
  • getSets
  • / On this page
    • getSets

      typedef

      Gets the sets that are available in the connection.

      • source

      function()

      Returns a promise that resolves to a list of Set objects contained in the connection. This is useful for querying a cacheConnection if it will be able to satisfy a request.

      An example response might look like:

      connection.getSets().then(function(sets){
          sets //-> [
          //   {complete: true},
          //   {userId: 5, start: 10, end: 20}
          //]
      })
      

      Returns

      {Promise<Array<Set>>}:

      A promise that resolves to an an array of sets.

      Use

      Extensions like can-connect/data/localstorage-cache/localstorage-cache implement .getSets to provide the sets they contain.

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