Commits

Kirill Simonov  committed f5e5aa3

Added locators to the syntax reference.

  • Participants
  • Parent commits 38eba15

Comments (0)

Files changed (2)

File doc/ref/syntax.rst

 +----------------------+---------------------------+---------------------------+----------------------+
 | `S . T`              | composition               | ``school.program``        |                      |
 +----------------------+---------------------------+---------------------------+----------------------+
+| `T [id]`             | locator                   | ``course[comp.304]``      |                      |
++----------------------+---------------------------+---------------------------+----------------------+
 | `@ T`                | detachment                | ``@school``               |                      |
 +----------------------+---------------------------+---------------------------+----------------------+
 | `{x,y,...}`          | record                    | ``{'bs','ms'}``           |                      |
 
 The composition operator is left-associative.
 
+Locator
+~~~~~~~
+
+The *locator* operation selects an individual entity by its *identity*:
+
+    `T [id]`
+
+The identity is a sequence of attributes and links which uniquely
+identify an entity.  Values of separate attributes are separated by a
+period (``.``).  An individual value could be left unquoted when it
+consists of digits, alphabetical characters or dash (``-``).  Values
+could be grouped using pairs of brackets (``[]``) or parentheses
+(``()``).
+
+.. htsql:: /department[comp]
+
+.. htsql:: /course[comp.515]
+
+.. htsql:: /class[(comp.515).(2010.spring).001]
+
 Attachment and Detachment
 ~~~~~~~~~~~~~~~~~~~~~~~~~
 

File tool/data/pkg/source/moves.yaml

     htsql_django
   install-requires: |
     HTSQL
+    Django