Json query is an array of objects (predicates). Each predicate is a pair: {“keyword”:”value”}, where:

  • Keyword is either: record header field, detail or link predicate.
  • Value depends on keyword. It may be literal, csv. It may be precedeed with compare operator or contains range or % operator. For link predicate, value is a sub query (another set of predicates).

LOGIC

These are following logical keywords:

  • not    
  • all                AND (default)
  • any        OR
  • notall        NOT ( AND )
  • notany        NOT ( OR )


notany:[{"title","Black"},{"title","White"}]  => NOT  ((rec_Title = ‘Black’)  OR

 (rec_Title = ‘White’))


By default the set of predicates is conjunction:


Ie  [{"title":"President"},{"f:1","Nixon"}] stands for  (rec_Title = ‘President’)

AND (dty_ID=1 and dty_Value=’Nixon’)


For short, it is possible to unite predicates of one level into single object:


{"title":"President", "f:1","Nixon"}


Example:


"notall"  {"any":[  {},{}  ]}, {"notany":[  {}. {}  ]} ]


NOT (   ( () OR () )  AND  (NOT(  ()AND()     ))   )


KEYWORDS

Record header


url,u

rec_URL


title

rec_Title


addedby

rec_AddedByUGrpID

todo

added

rec_Added

todo

date, modified

rec_Modified

Not fully implemented

after, since,  before

Synonyms for modified with compare operator in value

todo

workgroup,wg,Owner

rec_OwnerUGrpID

todo

id, ids

rec_ID


t, type

rec_RecTypeID



Bookmarks, Tags


user, us

bookmarked by use

tod

tag, keyword, kw

ta

tod


Details


f:X, field:

Detail field with field type I

Keyword must ends with field i

notes,

Where DT_SHORT_SUMMARY is replaced with local code of concept 2-

tod

latitude, lat, longitude, long, ln

Where DT_GEO_OBJECTis replaced with local code of concept 2-2

tod


Links


linked_to:

Find records which have linked records specified in value for this predicate (subquery or csv of ids

Resource field ID (:x) is optiona

linkedfrom:

Find records that are linked from records

Resource field ID (:x) is optiona

related_to:

Find records that relates to records from subquer

To verify: support for inverse relation term

relatedfrom:

Find records that relates FROM records from subquer

To verify: support for inverse relation term

link

Find records that have ANY relations/links with records from subquer



Values for Keywords


1)  Literal         "f:1":"Peter%"

2)  CSV        "ids":"1,2,3,4"

3)  WKT        "f:5":"POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))"    - @TODO

4)  Query


[{"t":"12"},{"linkedfrom:90":[{"t":"16"},{"f:89":"4095"},{"f:10":"1914-12-31T23:59:59.999Z<>1930-12-31T23:59:59.999Z"}]}]


Finds addresses for accountant offices.

Possible Operators WIthin Keywords


"X<>Y"                turns to BETWEEN X AND Y

"-X"                NOT (    )

"=X"                suppress LIKE operator for freetext field type

"<X”, ">X”        applicable for numeric and date values only

Created with the Personal Edition of HelpNDoc: Easy EBook and documentation generator