Creates a DB View.
Class DBView( entity, spec, [cond],[fields] )
entity | The entity on which the view acts as a filter. |
cond | initial value of the table conditions. |
fields | initial value of the view fields. |
This class represents a filter through which entities can be seen differently.
If not specified in the constructor call, the DBView.fields and DBView.cond property can be specified at any moment.
Note: It is not necessary to specify the fields composing a primary key of an entity in a view, if they must not be seen; those fields are automatically added to any access query even if not explictly requested.
Methods | |
apply | Apply this view to retreived data. |
applyDict | Apply this view to retreived data. |
titles | Return the titles of the columns that should be seen in this view. |
Apply this view to retreived data.
apply( data )
data | A dictionary of key => value pairs. |
Return | An array containing just the fields having a title, possibly rendered via their rndr function |
Apply this view to retreived data.
applyDict( data )
data | A dictionary of key => value pairs. |
Return | A dictionary containing just the fields having a title, possibly rendered via their rndr function |
Return the titles of the columns that should be seen in this view.
titles()
Return | array of strings representing the titles of the columns filtered by this view. |