Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

HyperDoc Query Language (HQL) is used across HDC application: advanced search,presentation filters and HOPA (as one of possible locators).

...

HQL statement consists of at least one expression in following form:

No Formatcode
{property_name} {operator} {value} || {property_name} {operator}

...

Several expression could form complex statements with usage of logical operators: andor. Additionally to accurately specify condition priority one could use parenthesis. Here is a sample form of complex statement for illustration:

No Formatcode
((expression or expression) and (expression and expression or expression)) and expression

Note

Please note that logical operators should be used in lower case, same applies to property names and some operators (which are not based on symbols).

List of operators:

Operator Name

Operator Symbol

Example

Suitable types *

Equals

=

property = 1

numeric, text, datetime and boolean

Not Equals

!=

property != "sample"

numeric, text, datetime and boolean

Not Less Than

>=

property >= 11.23

numeric

Not Greater Than

<=

property <= 12

numeric

Greater Than

>

property > 1

numeric

Less Than

<

property < 5.05

numeric

Before

before

property before"21.07.2017"

datetime

After

after

property after "2013-05-25T12:12:12.100+02:00"

datetime

In Set

in

property in ("DICT1", "DICT2", "DICT3")

numeric, text

Not In Set

not in

property not in (1, 2, 3)

numeric, text

Contains

contains

property contains "room"

text

Not contains

not contains

property not contains "room"

text

Starts With

starts-with

property starts-with "plan"

text

Not Starts With

not starts-with

property not starts-with "plan"

text

Is Empty

is empty

property is empty

numeric, text, datetime and boolean **

Is Not Empty

is not empty

property is not empty

numeric, text, datetime and boolean **


Data types:

  • Numeric types: Float, Integer, Serial, Currency, Area, Quantity, Length

  • Text types: Text, GUID

  • boolean: bool (true/false; on/off; yes/no; 0/1)

  • datetime: various date formats:

    • dd/MM/YYYY

    • dd-MM-YYYY

    • dd.MM.YYYY

    • YYYY/MM/dd

    • YYYY-MM-dd

    • YYYY.MM.dd

    • YYYY-MM-ddTHH:mm:ss.SSSXXX

  • Field values (there is a possibility to process HQL queries that compares values of two fields (numerical and string only). 


Info

* using wrong operator doesn't end with an error unless it is strictly not possible to evaluate given expression i.e. starts-with "test" would raise error, when "text" > "Text" would be processed, but is not recommended

** for text types we not only check whether value is set, but also whether it is not an empty string

...

These values could be given as string, number or date. Example: 

space_diff_bra_bta >=

 1

 1.02 and space_diff_bra_bta <=

 1

 1.05
space_diff_bra_bta >=

 1

 1.02 and space_diff_bra_bta <=

 1

 1.05
fi2space_name starts-with "test"

Now the language was extended to support also comparing values from other fields. For now numerical and string only.  Example:

space_diff_bra_bta

> 1

> 1.05 and space_bra > space_bta
(space_diff_bra_bta

> 1

> 1.05) and (space_bra > space_bta)

Examples

  • Automatic presentation filter example with HQL comparing two numerical fields:
    Image Modified


  • Manual Presentation filter example with HQL comparing two text fields:
    Image Modified


  • Auto Sum plugin with HQL condition
    Image Modified


This was not added to advanced search interface so it can be used only there were you can type in HQL (like filters, smart fields).

...