Jump to: navigation, search

Difference between revisions of "QUERY"


(Content query)
(Content query)
Line 26: Line 26:
 
Objects can be loaded on demand from the server, as storing a huge amount of data permanently on the device would need too much resources.
 
Objects can be loaded on demand from the server, as storing a huge amount of data permanently on the device would need too much resources.
  
A content query needs to be
+
A content query is a [[QUERY]] instance classified as [[SYSCLS_QUERY]] and can be related to other content objects. For being shown in the View hierarchy it is necessary to [[HowTo:Create_a_new_ViewItem#QueryViewItem|create a QueryViewItem]] for the query object itself.
* a [[QUERY]] instance classified as [[SYSCLS_QUERY]]
+
* related either to other content objects (to show up somewhere in the view hierarchy) or placed as root object of a [[VIEW|View]]
+
* described by a [[QUERYSCOPE|Query Scopes]] in the ACM
+
 
+
Further it is nessary to  
+
* [[HowTo:Create_a_new_ViewItem#QueryViewItem|create a QueryViewItem]] for the query object itself
+
  
 +
Further on, for being published to the client a [[QUERYSCOPE|Query Scopes]] has to be [[HowTo:Create_a_new_QueryScope|created]] and added to the [[ACM]].
  
 
# Once the scan is finished, wait until the scanner is closed and an empty browser shows up;
 
# Once the scan is finished, wait until the scanner is closed and an empty browser shows up;

Revision as of 11:53, 24 March 2015

IC METACLASS.gif Query
Name QUERY
Namespace System.Query
Internal Name SystemObjects.QUERY
TypeString UBIK.Kernel.MetaClass
RuntimeType UBIK.Kernel.Query
Purpose Configure queries
Version 2+

In UBIK, queries are used for fetching a list of ContentClasses from the database. Queries use data base mechanism for perfomant data access and will deliver a list of objects of a certain Metaclass. Queries can be used in different scenarios:

  • data fetching (n records)
  • finding a single or a set of recordset(s)
  • used as definition of root nodes in a View
IC Hint square.pngThere are specific methods available for this type!

Query and QueryItems

A Query is defined for a single MetaClass, where the MetaClass is defined in the property FILTEROBJECT. Once a query is evaluated it will deliver a list of objects of type ContentClasses (instances), filtered as defined by its QueryItems. The correspondence between Queries and its items is created and stored by a relationship SYSREL QUERY. Therefore a single QueryItem can be used several times for different Queries.

Content query

Objects can be loaded on demand from the server, as storing a huge amount of data permanently on the device would need too much resources.

A content query is a QUERY instance classified as SYSCLS QUERY and can be related to other content objects. For being shown in the View hierarchy it is necessary to create a QueryViewItem for the query object itself.

Further on, for being published to the client a Query Scopes has to be created and added to the ACM.

  1. Once the scan is finished, wait until the scanner is closed and an empty browser shows up;
  2. Depending on the network connection and the UBIK® sync mode, different ways of searching will be applied;
  3. During the search, the list might show a searching text before any objects are found;
    Searching for Objects
  4. If any objects are found, they will be added to the list.
    Displaying Objects

Scan query

Usage of DatabaseViews

It is also possible to define a Database View and use this View for the evaluation of Queries (see VirtualContentClass).

See also