fCMSPro Query object is used for building up the query that will be executed on the backend. It can be instantiated by using the getQuery function of the fMaster, fTemplate or fIndex components.

Query Data Types

Valid data types to be used in queries are:

Valid Query field values

Query Properties

Property

Description

limit Specifies the number of records to be returned.

totaldocs

The total number of query records.

sort

Object with sorting information .

filters

Array of objects with filtering information .

page

Specifies page of the recordset to be retrieved.

fields Specifies names of the fields to be retirieved.

Query Methods

Method

Description

addFilter Adds filter.

removeAllFilters

Removes all filters.

setSort

Sets sorting.

getXML

Returns query xml.

toString

Returns query string value.

addReturnRelation

Defines relations that will be returned.

taggedWith

Adds 'tagged_with' relation filter.

relatedTo

Adds 'related' relation filter.

copy

Return copy of the Query object.