Skip to content

Language essentials

This is a practical reference for the documented query patterns, not a complete formal specification. The existing parser grammar is maintained as FEQLSyntax.tpg in the FactEngine/Boston source tree; its FEQL name reflects that implementation’s naming.

ConstructPurposeExample
WHICHSelect an object type for resultsWHICH Film
A / ANIntroduce a related objectA Session
THATContinue a relationship readingA Session THAT has A Booking
ANDCombine conditionsAND is on (DateTime.MONTH:01)
NOExpress an absent related objecthas NO Booking
Typed valueConstrain an object to a value(Cinema:'Rialto')
Date partSelect or constrain part of a date(DateTime.YEAR:2023)
PatternMatch a value pattern(Mat Description~'%Flatscreen%')
RETURNRequest explicit fields or aggregatesRETURN Person.LoginName
GROUP BYGroup aggregate resultsGROUP BY SalesOrder.SldToCustCity
HAVINGFilter aggregate groupsHAVING SalesOrder.SlsLineTotal.SUM > 1000000
ORDER BYSort returned resultsORDER BY SalesOrder.SlsLineMatDesc
LIMITBound returned resultsCheck your execution target’s support.

RETURN is optional. WHICH before an object type returns the fields of the first-found uniqueness constraint for that object type. When none is found, it returns the primary key. It does not implicitly select every property.

Use the names, readings and field references defined by the model. Examples use uppercase keywords, title-style object names and lowercase predicates. Text values are shown in single quotes. These conventions help distinguish language structure from model vocabulary.

Execution depends on FactEngine, model mappings and the configured target. The training corpus contains broader and evolving patterns, including presentation directives; their presence is not a promise of support in every runtime. Validate the patterns you adopt in your own environment.