# RHNodeQuery
Inherits from: RHObject :: Paginator :: RHQuery :: RHTableQuery :: RHNodeNodeVersionQuery
# Class Methods
# Inherited methods
# New
function Frame New(Object prgCtx, Boolean filterPermissions=true, String tableName=.fTableName)
Constructs a new instance of RHNodeQuery. The initial return value will represent all objects in the system.
# Overrides:
New
in class RHTableQuery
# Parameters
prgCtx
- The program context.filterPermissions
- A boolean to determine whether objects should be filtered by permissions.tableName
- The table to base the node query on (defaults toWebNodes
).
# Returns
The RHNodeQuery instance.
# NewLatestOrMajorVersionQuery
function Frame NewLatestOrMajorVersionQuery(Object prgCtx, Boolean filterPermissions=true)
Constructs an instance of RHNodeQuery representing all documents but filtering out any document using Advanced Versioning that does not have at least one major version.
The constructor also sets up the join with LLAttrData to appropriately filter on category data.
# Parameters
prgCtx
- The program context.
# NewMajorVersionQuery
function Frame NewMajorVersionQuery(Object prgCtx, Boolean filterPermissions=true)
Constructs an instance of RHNodeQuery representing all documents with at least one major version.
The constructor also sets up the join with LLAttrData to appropriately filter on category data.
# Parameters
prgCtx
- The program context.
# NewUserWebNodesView
function Frame NewUserWebNodesView(Object prgCtx, Boolean filterPermissions=true)
Constructs a new instance of RHNodeQuery.
# Instance Methods
# Property Methods
Property methods can be accessed with the valueForKey
method.
attrdata attrversionjoinfield bury classidentifier classname clone columnnames columnnameswithprefix count currentpagesize cursor distinct endindex errorassoc exists first hash hasnext hasotherpages hasprevious identityhashcode ispagingenabled issortpossible items itemswithpermissions iterator last methods modelinstance nextpagenumber okassoc pagecount pagenumber pagerange pagesize pagesizes pkdbaliasname pkdbfieldname pkfieldname precache previouspagenumber propertymethods queryvalues reset reverse serialize startindex string tablename tablenamealiased toexcel values_list
# Inherited methods
addColumnSubquery annotate assert attrVersionJoinField bury cacheMethod cacheValueForKey callSuper checkError chunk class classIdentifier className clone columnNames columnNamesWithPrefix count currentPageSize cursor delete deserialize dict distinct endIndex endTrans exists extra filter filterAttribute filterCategory filterCategoryNot filterCategoryUpgradeable filterGroupMembership filterIfDefined filterPermissions filterSelectedFromRequest first fixdbfieldcase get hash hasNext hasOtherPages hasPrevious identityHashCode isAccessorMethod isCached isInstanceOf isPagingEnabled isProperty isPropertyMethod isSortPossible items iterator join keyToDBFieldname keyToDBFieldnameNoPrefix last limit max methods min modelInstance nextPageNumber order_by pageCount pageNumber pageRange pageSize pageSizes pkDBAliasName pkDBFieldName pkFieldName pluck precache prepareForReuse previousPageNumber propertyMethods queryValues removeFromCache reset resetCache resetSubclass respondsTo reverse selectForUpdate serialize setAllowMassUpdate setAttrVersionJoinField setCacheValueForKey setDBFieldNameForKey setEnableBulkUpdate setFilterPermissions setLimit setObject setOffset setOrderBy setPageNumber setPageSize setPaging setPKFieldName setQueryOrderBy setQueryValues setSort setSQL setTableName setUpdateValueForKey setValueForKey setValueForKeyPath setValues sort sortCustom sql sqlsubquery startIndex startTrans string sum super tableName tableNameAliased toCSV toExcel union update valueForKey valueForKeyPath values values_list
# excludeReleaseRevision
function Frame excludeReleaseRevision()
This function is used by RHNode.descendents to not include releases or revision, which should be managed separately.
# filterFacet
function Frame filterFacet(Dynamic facet, Dynamic op, Dynamic value=Undefined)
TODO: Facets are funny when it comes to dates. Instead of storing a date an integer of the form YYYYMMDD is stored. This needs to be managed somehow. I imagine some of this code should be moved into RHFacet.
# filterHasWorkflowCopy
function Frame filterHasWorkflowCopy()
# itemsWithPermissions
function RecArray itemsWithPermissions(Integer perms=$PSee)
# joinAttribute
function Frame joinAttribute(String key, Dynamic category, Dynamic attribute, Integer AttrIndex=1)
Sorts the RHNodeQuery by joining with LLAttrData. The attribute cannot be contained within a Set.
# precacheWithPermissions
function Frame precacheWithPermissions(String pkfieldname=.pkDBAliasName(), String keyTableName=.tableName())
The precache()
function is used to precache the raw values of a database query.
Cached values can be picked up with the $RHCore.RequestCache.PrecacheQueryset(<keyTableName>, <pk>) function.
# Parameters
pkfieldname
- The primary key to index the cached items.keyTableName
- Cached items can be picked up using the keyTableName.
# Returns
The
RHTableQuery
.
# sortAttribute
function Frame sortAttribute(Dynamic category, Dynamic attribute, Boolean ascending=true, Integer AttrIndex=1)
Sorts the RHNodeQuery by joining with LLAttrData. The attribute cannot be contained within a Set.
← RHNode RHNodeVersion →