Index
View abstraction
The TIP_View is a rows data model.
A reference to the TIP_Data object the view will apply
The filter conditions
The filter is defined in the TIP_View() constructor. The exact format of this string is data engine dependent: see the documentation of the data engine used by the data object for further informations.
The fields to get
A subset of fields to get with this view. Leave it undefined to get all the fields.
The list of rows
This list should be filled in the construction process. It is null if not yet filled or false on errors.
The format of the row depends on the type of the view. In TIP_View, the format is the one used also in TIP_Data. Furthermore, some common fields are added to every row (also for the special views):
A list of summary values
Here must be present the values of summary operations done on the 'rows' property, such as totals and counts.
The following values are always present in 'summary':
Row callback
Called for every row added to the 'rows' property. The only argument passed to the callback is a reference to the added row. Useful to add calculated fields to every row.
The custom callback must return true to include the processed row in the 'rows' property.
View callback
Called at the end of the population of the 'rows' property. A reference to the current view is passed as argument to the callback. Useful to add summary values or perform general operations on the whole data view.
The custom callback must return true to validate the view or false to invalidate it.
Constructor
Initializes a TIP_View instance.
Check for a valid view
Checks if this view instance contains valid data, that is if the query was performed succesfully.
The number of rows in this view
Get a field value from the current row
Get a summary field value
Set a summary field value
Set the internal cursor to the first row
Get the current row
Get the id of the current row
Set the cursor to the next row
Check if the current row is valid