Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Reference/Set a variable from another unit

I know I can reference or set a variable, or even call a function with DSL in one unit from another unit by first specifying the unit name and then the variable/function as follows:

SomeUnit:SomeVariable
SomeUnit:SomeFunction()

Is there some other way of doing this that is less intrusive?

1
1
Posted 4 years ago
Votes Newest

Answers


Unfortunately this is the only way to do so. Helium DSL is based on a Model-View-Presenter (MVP) pattern that couples presenters and views more closely than say the MVC pattern does. This means that referencing variables or functions from one unit should specifically be designated as the variables or functions in that specific unit. Read a bit more about these two patterns here:
https://stackoverflow.com/questions/2056/what-are-mvp-and-mvc-and-what-is-the-difference
https://www.oreilly.com/library/view/learning-javascript-design/9781449334840/ch10s09.html

1
1
Posted 4 years ago
Edited 4 years ago
DevOps
84 × 2 Administrator
228 Views
1 Answer
4 years ago
4 years ago
Tags