Click or drag to resize

PFQuery Class

Represents a query allowing to select elements or aggregations of elements in a Packflow database.
Inheritance Hierarchy
SystemObject
  Packflow.CorePFQuery

Namespace:  Packflow.Core
Assembly:  MicaSystems.Packflow.Core (in MicaSystems.Packflow.Core.dll) Version: 1.0.0.0 (3.2.0.295)
Syntax
C#
[DataContractAttribute]
public sealed class PFQuery

The PFQuery type exposes the following members.

Constructors
  NameDescription
Public methodPFQuery
Initializes a new instance of the PFQuery class.
Top
Properties
  NameDescription
Public propertyAggregations
Gets or sets the list of aggregations.

When used without groups in a query, one PFGroupedObject is returned containing aggregations of all objects.

When used with groups in a query, each returned PFGroupedObject will contain these aggregations.

Public propertyCustomFields
Gets or sets the list of custom fields, impacting which values are selected.

Important: the use of this list depends on the value of FieldsMode.

Public propertyEnablePaging
Gets or sets a value indicating whether paging is active.

If true, PageSize and PageNo are used.

Default value: false.

Public propertyFieldsMode
Gets or sets a value specifying how a query should determine which values are selected as output.
Public propertyGroups
Gets or sets the list of groups.

If used, the query will return grouped objects with aggregated values, instead of targeted objects.

Public propertyOrders
Gets or sets the list of sorting rules.
Public propertyPageNo
Gets or sets the page number. One-based index.

Only used if EnablePaging is set to true.

Public propertyPages
Gets or sets the number of pages to return.

This setting is not persisted.

Only used if EnablePaging is set to true.

Public propertyPageSize
Gets or sets the page size.

Only used if EnablePaging is set to true.

Public propertyPagingIncludeNextResult
Gets or sets a value indicating whether this query can include the first result of the next page, if any.

This allows to know easily if there is a next page.

Only used if EnablePaging is set to true.

Public propertyResultsLimit
Gets or sets the maximum number of elements that can be returned by this query.

Only used if EnablePaging is set to false.

Public propertyResultsScope
Gets or sets the scope of the query, specifying which kind of objects is concerned by the query.
Public propertyResultsSkip
Gets or sets the number of elements to bypass. Following elements are returned.

Only used if EnablePaging is set to false.

Default value: 0 (no element skipped).

Public propertyRootNode
Gets or sets the root node of the filters tree.
Public propertyUseBulkMode
Gets or sets a value indicating whether the bulk mode must be used.

The bulk mode is generally used in situations where RLS can be very restrictive on large amount of data.

The bulk mode will filter results using the query filters first, and RLS only after.

This mode will also use a cache for RLS information.

Top
Methods
  NameDescription
Public methodAddAggregation
Adds a new aggregation.
Public methodAddFilter(PFQueryFilter)
Adds a new filter in the root node of filters tree.
Public methodAddFilter(String, Object)
Adds a new filter in the root node of filters tree.
Public methodAddFilter(String, PFQueryFilterOperator, Object)
Adds a new filter in the root node of filters tree.
Public methodAddGroup
Adds a new group.
Public methodAddOrder
Adds a new sorting rule.
Public methodChangeOrder(String)
Resets orders and adds a new order.
Public methodChangeOrder(String, PFQueryOrderType)
Resets orders and adds a new order.
Public methodCheckFieldsAvailability
Checks if the fields used in this query are available in the specified parent, given a list of available fields.
Public methodChooseFields(PFQueryFieldsMode)
Changes the way this query should determine which values are selected as output.
Public methodChooseFields(PFQueryFieldsMode, ListString)
Changes the way this query should determine which values are selected as output.
Public methodChooseFields(PFQueryFieldsMode, String)
Changes the way this query should determine which values are selected as output.
Public methodStatic memberCreateQuery
Creates a new instance of the PFQuery class.
Public methodStatic memberCreateQuery(String)
Creates a new instance of the PFQuery class from a serialized PFQuery.
Public methodStatic memberCreateQuery(PFQueryFilter)
Creates a new instance of the PFQuery class, with default filters.
Public methodStatic memberCreateQuery(PFQueryFilter, PFQueryOrder)
Creates a new instance of the PFQuery class, with a default filter and a default order.
Public methodStatic memberCreateQueryFilter(String, Object)
Creates a new instance of the PFQuery class, with a default filter.
Public methodStatic memberCreateQueryFilter(String, PFQueryFilterOperator, Object)
Creates a new instance of the PFQuery class, with a default filter.
Public methodStatic memberCreateQueryFilter(String, Object, String)
Creates a new instance of the PFQuery class, with a default filter and a default order.
Public methodStatic memberCreateQueryFilter(String, PFQueryFilterOperator, Object, String)
Creates a new instance of the PFQuery class, with a default filter and a default order.
Public methodStatic memberCreateQueryFilter(String, Object, String, Boolean)
Creates a new instance of the PFQuery class, with a default filter and a default order.
Public methodStatic memberCreateQueryFilter(String, PFQueryFilterOperator, Object, String, Boolean)
Creates a new instance of the PFQuery class, with a default filter and a default order.
Public methodStatic memberCreateQueryOrderBy(String, PFQueryFilter)
Creates a new instance of the PFQuery class, with default filters.
Public methodStatic memberCreateQueryOrderBy(String, Boolean)
Creates a new instance of the PFQuery class, with a default order.
Public methodStatic memberCreateQueryOrderBy(String, Boolean, PFQueryFilter)
Creates a new instance of the PFQuery class, with a default order and multiple default filters.
Public methodGetACopy
Copies this PFQuery using serialization.
Public methodGetAggregationsFields
Gets the names of all fields/columns used in aggregations.
Public methodGetAllFilters
Gets all filters in the filters tree, recursively.
Public methodGetGroupsFields
Gets the names of all fields/columns used in groups.
Public methodGetNextResultsCount
Returns 1 if PagingIncludeNextResult is true, 0 otherwise.
Public methodGetOrderFields
Gets the names of all fields/columns used in sorting rules.
Public methodGetSubGroupQuery(KeyValuePairString, Object)
Creates a new PFQuery object retrieving values of a particular group.

The new query will replace one level of group by a filter on the same field.

E.g. a gridview displaying groups will call this method to obtain the query to execute when one of the groups is opened.

Public methodGetSubGroupQuery(ListKeyValuePairString, Object)
Creates a new PFQuery object retrieving values of a particular group.

The new query will replace one level of group by a filter on the same field.

E.g. a gridview displaying groups will call this method to obtain the query to execute when one of the groups is opened.

Public methodStatic memberOrderBy
Starts to build a new query. Adds a new sorting rule.
Public methodStatic memberOrderByDescending
Starts to build a new query. Adds a new sorting rule.
Public methodStatic memberSelect
Starts to build a new query. Changes the way the query should determine which values are selected as output.
Public methodSerialize
Serializes this PFQuery in XML.

The returned string can be converted into a PFQuery using the static method PFQuery.CreateQuery(serializedQuery).

Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodStatic memberWhere(String, Object)
Starts to build a new query. Adds a new filter in the root node of filters tree.
Public methodStatic memberWhere(String, PFQueryFilterOperator, Object)
Starts to build a new query. Adds a new filter in the root node of filters tree.
Public methodStatic memberWhereIsNotNull
Starts to build a new query. Adds a new filter in the root node of filters tree.
Public methodStatic memberWhereIsNull
Starts to build a new query. Adds a new filter in the root node of filters tree.
Top
Extension Methods
  NameDescription
Public Extension MethodAsT
Casts an object to another type. Returns default(T) if the object is null.
(Defined by Utils_Other.)
Public Extension MethodEqualsAll
Checks that this object is equal to every object in parameters.
(Defined by Utils_Other.)
Public Extension MethodEqualsAny
Checks that this object is equal to at least one of the parameters.
(Defined by Utils_Other.)
Public Extension MethodGetString
Converts an object to String using ToString() method, else returns String.Empty.
(Defined by Utils_Other.)
Public Extension MethodIsGenericListOverloaded.
Checks if this object is a System.Collections.Generic.List.
(Defined by Utils_Linq.)
Public Extension MethodIsGenericList(Type)Overloaded.
Checks if this object is a System.Collections.Generic.List using type as T.
(Defined by Utils_Linq.)
Public Extension MethodSerializeOverloaded.
Serializes an object into an XML document.
(Defined by Utils_Xml.)
Public Extension MethodSerialize(String)Overloaded.
Serializes an object into an XML document.
(Defined by Utils_Xml.)
Public Extension MethodSerializeJsonOverloaded.
Serializes an object using a DataContractJsonSerializer.
(Defined by Utils_String.)
Public Extension MethodSerializeJson(ListType)Overloaded.
Serializes an object using a DataContractJsonSerializer.
(Defined by Utils_String.)
Public Extension MethodSerializeJson(DataContractJsonSerializerSettings)Overloaded.
Serializes an object using a DataContractJsonSerializer.
(Defined by Utils_String.)
Top
See Also