Skip to content

datastore.query.filter should support has_ancestor operator #12

Description

@proppy

currently it seems that datastore.query.filter only support regular comparaison operator:

  var fieldName = filter.replace(/[>|<|=|>=|<=]*$/, '').trim(),
      op = filter.substr(fieldName.length, filter.length).trim();

It should support HAS_ANCESTOR operator:
https://developers.google.com/datastore/docs/concepts/queries#Datastore_Ancestor_queries

Activity

  1. rakyll commented on Jul 9, 2014

    @rakyll
    Contributor

    Is it OK to have a separate hasAncestor method, rather than providing it as a filter operation.

    q = ds.createQuery(...).hasAncestor(key);
  2. proppy commented on Jul 10, 2014

    @proppy
    ContributorAuthor

    Yes, python (ndb) does it with a separate kwarg:
    https://developers.google.com/appengine/docs/python/ndb/queries#ancestor

  3. rakyll commented on Jul 11, 2014

    @rakyll
    Contributor

    7c5125a fixes this issue.

  4. modified the milestones: , Datastore Stable on Feb 2, 2015
  5. added 2 commits that reference this issue on Sep 15, 2022
  6. 69 remaining items

  7. added a commit that references this issue on Feb 5, 2026
    b7a4b45
  8. added 3 commits that reference this issue on Feb 23, 2026
    62431b7
    2bb0251
    81cdfd6
  9. added a commit that references this issue on Feb 26, 2026
  10. added a commit that references this issue on Mar 5, 2026
  11. added a commit that references this issue on Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.api: datastoreIssues related to the Datastore API.triage meI really want to be triaged.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions