Changes between Version 2 and Version 3 of S3/S3ResourceFilter


Ignore:
Timestamp:
01/31/12 12:05:58 (10 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3/S3ResourceFilter

    v2 v3  
    33S3ResourceFilter is a class representing the DAL queries and Python filters to select the records for a resource.
    44
     5== Overview ==
     6
    57S3ResourceFilters are a part of S3Resources:
    68
     9[[Image(rfilter.png)]]
     10
     11They contain the queries and filters to extract the data from the database.
     12
     13At the time an S3Resource gets defined, a S3ResourceFilter is automatically added to it. This default filter (so called "master query") covers:
     14
     15  - available records (i.e. not deleted)
     16  - accessible records (i.e. access permitted)
     17  - selected records by record ID and/or UID
     18  - joined records (e.g. components)
     19
     20It is possible to extend this filter during the request:
     21
     22  - by a URL query
     23  - by the {{{S3Resource.add_filter()}}} method
     24
     25S3ResourceFilters can filter for both real fields in the database table as well as virtual (computed) fields.
     26
     27== Design ==
     28
     29S3ResourceFilters consist of a hierarchical set of web2py Query and S3ResourceQuery objects, where:
     30
     31  - Query instances represent the DAL queries ("query")
     32  - S3ResourceQuery instances represent virtual field filters ("vfltr")
     33
     34The process for the extraction of rows from the database is as follows: