app/index.yaml
author Sverre Rabbelier <srabbelier@gmail.com>
Sat, 06 Dec 2008 14:23:53 +0000
changeset 679 77a286ff6667
parent 287 847ea0747e4f
child 1676 a3c33bef2ea8
permissions -rw-r--r--
Introduce dynamic scope_path regexps Instead of relying on scope_path's being "one slash deep", we should instead allow for either: 1. scope_paths that have a pre-defined depth 2. scope_paths that can be arbitrarily deep We achieve 1 by setting an entities scope_logic to another logic module. We then recursively call getScopeDepth until we get to the topmost entity (that is, an unscoped entity). A little different is the solution to 2, since some entities can have an arbitrarily deep scope (such as Documents), we need to have some way of signaling this to getScopePattern. A clean solution is to return None, rather than a number. If None is returned, the SCOPE_PATH_ARG_PATTERN is returned as regexp instead, which will match an arbitrarily deeply nested scope. The solution for 2 requires that we return None somewhere in the scope_logic chain, the most straight forward method to do so is to override getScopeDepth anywhere such a scope is needed and make it return None. A more elegant solution however, is to set the scope_logic to that module in all entities that require it. Patch by: Sverre Rabbelier
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
41
74e1f65dd960 Empty index.yaml file created by dev_appserver.py, so that it will stop
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     1
indexes:
74e1f65dd960 Empty index.yaml file created by dev_appserver.py, so that it will stop
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     2
74e1f65dd960 Empty index.yaml file created by dev_appserver.py, so that it will stop
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     3
# AUTOGENERATED
74e1f65dd960 Empty index.yaml file created by dev_appserver.py, so that it will stop
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     4
74e1f65dd960 Empty index.yaml file created by dev_appserver.py, so that it will stop
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     5
# This index.yaml is automatically updated whenever the dev_appserver
74e1f65dd960 Empty index.yaml file created by dev_appserver.py, so that it will stop
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     6
# detects that a new type of query is run.  If you want to manage the
74e1f65dd960 Empty index.yaml file created by dev_appserver.py, so that it will stop
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     7
# index.yaml file manually, remove the above marker line (the line
74e1f65dd960 Empty index.yaml file created by dev_appserver.py, so that it will stop
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     8
# saying "# AUTOGENERATED").  If you want to manage some indexes
74e1f65dd960 Empty index.yaml file created by dev_appserver.py, so that it will stop
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     9
# manually, move them above the marker line.  The index.yaml file is
74e1f65dd960 Empty index.yaml file created by dev_appserver.py, so that it will stop
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    10
# automatically uploaded to the admin console when you next deploy
74e1f65dd960 Empty index.yaml file created by dev_appserver.py, so that it will stop
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    11
# your application using appcfg.py.
287
847ea0747e4f Update indexes in index.yaml file.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents: 54
diff changeset
    12
847ea0747e4f Update indexes in index.yaml file.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents: 54
diff changeset
    13
# Unused in query history -- copied from input.
847ea0747e4f Update indexes in index.yaml file.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents: 54
diff changeset
    14
- kind: Work
847ea0747e4f Update indexes in index.yaml file.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents: 54
diff changeset
    15
  properties:
847ea0747e4f Update indexes in index.yaml file.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents: 54
diff changeset
    16
  - name: inheritance_line
847ea0747e4f Update indexes in index.yaml file.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents: 54
diff changeset
    17
  - name: title