|Version 5 (modified by 10 years ago) ( diff ),|
S3ResourceFilter is a class representing the DAL queries and Python filters to select the records for a resource.
S3ResourceFilters are a part of S3Resources:
They contain the queries and filters to extract the data from the database.
At the time an S3Resource gets defined, a S3ResourceFilter is automatically added to it. This default filter (so called "master query") covers:
- available records (i.e. not deleted)
- accessible records (i.e. access permitted)
- selected records by record ID and/or UID
- joined records (e.g. components)
It is possible to extend this filter during the request:
- by a URL query
- by the
S3ResourceFilters can filter for both real fields in the database table as well as virtual (computed) fields.
S3ResourceFilters consist of a hierarchical set of web2py Query and S3ResourceQuery objects, where:
- Query instances represent the DAL queries ("query")
- S3ResourceQuery instances represent virtual field filters ("vfltr")
The process for the extraction of rows from the database is as follows: