RT::SearchBuilder - a baseclass for RT collection objects
Only find items that haven't been disabled
Only find items that have been deleted.
Find all matching rows, regardless of whether they are disabled or not
Takes a paramhash of key/value pairs with the following keys:
- CUSTOMFIELD - CustomField id. Optional
- OPERATOR - The usual Limit operators
- VALUE - The value to compare against
This Limit sub calls SUPER::Limit, but defaults "CASESENSITIVE" to 1, thus making sure that by default lots of things don't do extra work trying to match lower(colname) agaist lc($val);
We also force VALUE to
NULL when the OPERATOR is
IS NOT. This ensures that we don't pass invalid SQL to the database or allow SQL injection attacks when we pass through user specified values.
If it has a SortOrder attribute, sort the array by SortOrder. Otherwise, if it has a "Name" attribute, sort alphabetically by Name Otherwise, just give up and return it in the order it came from the db.
Return this object's ItemsArray, in the order that ItemsOrderBy sorts it.
ColumnMap needs a Collection name to load the correct list display. Depluralization is hard, so provide an easy way to correct the naive algorithm that this code uses.← Back to index