Utils

Table of contents

  1. Parent from key
  2. Parent doc from key
  3. Id from key
  4. Key from id and model

Parent from key

Get parent collection path from key

parent_collection = utils.get_parent(key)

Parent doc from key

Get parent document path from key

parent_doc = utils.get_parent_doc(key)

Id from key

Get id from key

id = utils.get_id(key)

Key from id and model

Get key from id and model

Simply concatenates model.collection_name and id so cannot derive the full key for models used in subcollections.

key = utils.generateKeyFromId(model, key)

Copyright © 2019 FireO All rights reserved. Powered by OctaByte