phpPeanuts  2.2.0
phpPeanuts framework
 All Data Structures Namespaces Files Functions Variables
Public Member Functions | Static Public Member Functions | Data Fields
PntSqlSort Class Reference

Inherits PntSqlSpec.

Public Member Functions

 __construct ($id=null, $itemType=null)
 
 initPropertyDescriptors ()
 
 getFilter ()
 
 setFilter ($filter)
 
 addSortSpecFilter ($aPntSqlFilter)
 
 addSortSpecFilterFirstOrMoveExistingFirst ($aPntSqlFilter)
 
 addSortSpec ($path, $direction='ASC')
 
 sortBy ($path, $direction='ASC')
 
 appliesTo ($type, $persistent=false)
 
 getNewItemPropName ()
 
 setTableAlias ($alias)
 
 getSql ()
 
 getSql_WhereToLimit ($groupBy=true)
 
 addParamsTo ($qh)
 
 addExtraSelectParamsTo ($qh)
 
 getExtraSelectExpressions ()
 
 getSelectExpression ($filter, $count)
 
 getSqlForJoin ()
 
 generateSqlForJoins (&$aliasCount, &$paramCount, $backTrack=array())
 
 getOrderBySql ()
 
 getSortDirection ($sortSpecFilter)
 
 getSortSpecFilters ()
 
 getSortPaths ()
 
 getSortNavs ()
 
 sorted_insert (&$someSortedObjects, $toInsert)
 
 sort ($items)
 
 asort ($items)
 
 compare ($a, $b)
 
- Public Member Functions inherited from PntSqlSpec
 __construct ($id=null)
 
 getId ()
 
 getLabel ()
 
 getQueryHandler ()
 
 getDescription ($conv)
 
 setDescription ($value)
 
 getSqlForJoin ()
 
 generateSqlForJoins (&$aliasCount, &$paramCount, $backTrack=array())
 
 isJoinFilter ()
 
 where ($path, $comparatorId=null, $value1=null, $value2=null)
 
 sortBy ($path, $direction='ASC')
 
 retrieve ()
 
 retrieveFirst ()
 
 retrieveOne ()
 
- Public Member Functions inherited from PntObject
 __construct ()
 
 copy ()
 
 getClass ()
 
 getClassDescriptor ()
 
 initPropertyDescriptors ()
 
 getOid ()
 
 addFieldProp ($name, $type, $readOnly=false, $minValue=null, $maxValue=null, $minLength=0, $maxLength=null, $classDir=null, $persistent=true)
 
 addDerivedProp ($name, $type, $readOnly=true, $minValue=null, $maxValue=null, $minLength=0, $maxLength=null, $classDir=null)
 
 addMultiValueProp ($name, $type, $readOnly=true, $minValue=null, $maxValue=null, $minLength=0, $maxLength=null, $classDir=null)
 
 getPropertyDescriptor ($propertyName)
 
 get ($propertyName, $filter=true)
 
 set ($propertyName, $value)
 
 getOptions ($name, $filter=true)
 
 getValueValidator ($prop)
 
 validateGetErrorString ($prop, $value, $validateReadOnly=true)
 
 basicGetLabel ()
 
 getLabel ()
 
 __toString ()
 
 release ()
 
 getEditInfo ()
 
 toString ()
 
 _getValueValidator ($prop)
 

Static Public Member Functions

static over ($className, $propName, $sort=null)
 
static overProp ($prop, $sort=null)
 
- Static Public Member Functions inherited from PntSqlSpec
 initPropertyDescriptors ()
 
- Static Public Member Functions inherited from PntObject
static isPersistent ()
 
static getClassDescriptorClass ()
 
static getClassDir ()
 
static getClassLabel ()
 
static getUiColumnPaths ()
 
static getReportColumnPaths ()
 
static getUiFieldPaths ($clsDes)
 
static newNavigation ($key, $itemType)
 

Data Fields

 $sortUsingJoins = true
 
- Data Fields inherited from PntSqlSpec
 $label
 
 $propLabel
 
 $itemType
 

Constructor & Destructor Documentation

__construct (   $id = null,
  $itemType = null 
)

Member Function Documentation

addExtraSelectParamsTo (   $qh)

Add the parameter values for the ExtraSelectExpressions to $qh

Parameters
PntDao$qh
addParamsTo (   $qh)

Add the parameter values from this to $qh

Parameters
PntDao$qh
addSortSpec (   $path,
  $direction = 'ASC' 
)

Adds a sort specification

Parameters
string$paththe path to sort by
string$direction'ASC' or 'DESC'
Exceptions
PntReflectionErrorif the path does not exist from >>itemType
addSortSpecFilter (   $aPntSqlFilter)
addSortSpecFilterFirstOrMoveExistingFirst (   $aPntSqlFilter)
appliesTo (   $type,
  $persistent = false 
)
asort (   $items)
compare (   $a,
  $b 
)
generateSqlForJoins ( $aliasCount,
$paramCount,
  $backTrack = array() 
)
getExtraSelectExpressions ( )
Returns
string SQL select expressions for sorting by this is to be called instead of the depricated ::getSqlForJoin and appended to the SELECT clause
getFilter ( )
getNewItemPropName ( )

Get the name of the property that can be given a suggested value when creating a new item. The suggested value may be the last search value

getOrderBySql ( )
getSelectExpression (   $filter,
  $count 
)
getSortDirection (   $sortSpecFilter)

Actually we abuse PntSqlFilters as sort specifiers. For the sort direction we use the comparatorId > as DESC, otherwise ASC

getSortNavs ( )
getSortPaths ( )
getSortSpecFilters ( )
getSql ( )

For compatibilty with older versions

Returns
String getSql_WhereToLimit
getSql_WhereToLimit (   $groupBy = true)
getSqlForJoin ( )

Return a piece of SQL for extending the FROM clause with the tables to be joined

initPropertyDescriptors ( )
static over (   $className,
  $propName,
  $sort = null 
)
static
static overProp (   $prop,
  $sort = null 
)
static
setFilter (   $filter)
setTableAlias (   $alias)
sort (   $items)
sortBy (   $path,
  $direction = 'ASC' 
)

(Navigational query DSL) Adds a sort specification

Parameters
string$paththe path to sort by
string$direction'ASC' or 'DESC'
Returns
PntSqlSort this
Exceptions
PntReflectionErrorif the path does not exist from >>itemType
sorted_insert ( $someSortedObjects,
  $toInsert 
)

Field Documentation

$sortUsingJoins = true

The documentation for this class was generated from the following file: