Open jxn-30 opened 3 years ago
Version V.0.0.1 merged into master with #53
I've been looking into the examples given and found one thing that is a bit weird:
sum of personal in all buildings that have more than 3 vehicles
sum((buildings WHERE len(vehicles WHERE .building_id = ..id) > 3).personal_count)
in this example, personal_count
strikes me as odd.
I know that much of the LSSM is german (since the game is german), but as this is a query language, where everything is in english, I do believe that using the english personnel_count
would be better suited. Especially since personal
refers to something completely different in english
I've been looking into the examples given and found one thing that is a bit weird:
sum of personal in all buildings that have more than 3 vehicles
sum((buildings WHERE len(vehicles WHERE .building_id = ..id) > 3).personal_count)
in this example,
personal_count
strikes me as odd. I know that much of the LSSM is german (since the game is german), but as this is a query language, where everything is in english, I do believe that using the englishpersonnel_count
would be better suited. Especially sincepersonal
refers to something completely different in english
Thats just a name used in the API of the game. And LSSMAQL is just something to use the APi of the game. So they need to use the exact names of that.
The attributes are the same as used in the APIs: https://www.missionchief.com/api/buildings https://www.missionchief.com/api/vehicles https://www.missionchief.com/api/allianceinfo https://www.missionchief.com/api/credits https://www.missionchief.com/einsaetze.json
This is because Sebastian, the original founder of the game, used some "denglish" (mixing german and english) terms internally and the new developer team also does this now and then.
As the idea of LSSMAQL was/is to provide a Language to query these APIs, the exact same attribute names are required. There are also plans to provide a GUI for LSSMAQL but unfortunately the project is on hold currently.
I just found something that would be an interesting change to this idea. There is a query language for JSON that is perfect for our usecase and should be easy to implement. I understand that it's not "made" by us but would provide a feature till we do.
Possible alternatives:
after fiddling around with JSONata and GROQ in tend to favorite JSONata since a more complete feature set. Eg. string/number conversion is not possible with groq.
A Query Language to get API-Results from cached API Values.
Note: This is not yet a full concept and may change at any time
An LSSMAQL-Query Always returns an List of return Values.
Query should be able to process:
.
-NotationWHERE
EBNF of a Query: We used EBNF used in Railroad Diagram Generator This may still contain errors
Examples can be found in lssmaql@LSSM-V.4/lssmaql/specs/examples.md