How to use the @posva/vuefire-core.bindDocument function in @posva/vuefire-core

To help you get started, we’ve selected a few @posva/vuefire-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vuejs / vuefire / packages / vuefire / src / index.js View on Github external
return new Promise((resolve, reject) => {
    let unbind
    if (ref.where) {
      unbind = bindCollection(
        {
          vm,
          key,
          ops,
          collection: ref,
          resolve,
          reject,
        },
        options
      )
    } else {
      unbind = bindDocument(
        {
          vm,
          key,
          ops,
          document: ref,
          resolve,
          reject,
        },
        options
      )
    }
    vm._firestoreUnbinds[key] = unbind
  })
}
github vuejs / vuefire / packages / vuefire / src / firestore.ts View on Github external
return new Promise((resolve, reject) => {
    let unbind
    if ('where' in ref) {
      unbind = bindCollection(
        {
          vm,
          key,
          ops,
          collection: ref,
          resolve,
          reject,
        },
        options
      )
    } else {
      unbind = bindDocument(
        {
          vm,
          key,
          ops,
          document: ref,
          resolve,
          reject,
        },
        options
      )
    }
    vm._firestoreUnbinds[key] = unbind
  })
}
github vuejs / vuefire / packages / vuexfire / src / firestore.ts View on Github external
return new Promise((resolve, reject) => {
    sub[key] =
      'where' in ref
        ? bindCollection(
            {
              vm: state,
              key,
              collection: ref,
              ops,
              resolve,
              reject,
            },
            options
          )
        : bindDocument(
            {
              vm: state,
              key,
              document: ref,
              ops,
              resolve,
              reject,
            },
            options
          )
  })
}