You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is proposal to support the ability to make manual changes to data stored in a Gaia database and have the rules in their application be executed.
The scenario would enable updating a grid in the data navigator of the Gaia Tools VS Code extension, clicking a button to "save changes". After the changes are saved, they would see console output from a new "sim" target that shows trace logging from the rules engine as well as any application specific logging inside the rules (or functions that the rules call).
Rule tracing can be turned on by changing the log level of the rules logger in the gaia_log.conf file. Additionally or alternatively, user-defined logging using the app logger could also output to the console (and therefore seen) by a user using the VS Code extension.
At a high level, this proposal involves the following changes:
[new library] Add a new main function whose purpose is to use a file watcher to see changes to a .json file that has a description of all the changes made by the user in an updatable grid. When this file changes, the generated code in main would read the file, open a transaction, use a reflection API to write changes to the database, and commit the transaction.
[gaia.cmake] - Add the "app_name_sim" target to our gaia cmake helpers to generate the helper and links to above main. This could be configured to only generate the sim target if an argument is passed in. There is some handwaving here since the customer would have to replace their main function with this one.
[VS Code Extension] - Make the current data navigator grid updatable. Cache changes made to different rows and tables. For now this proposal is scoped to changes in a single database. In addition to allowing updates to existing row, the grid should be extended to allow insertion of new rows and deletion of existing rows.
[VS Code Extension] - Add a "save" button at the data explorer level. Clicking "save" will generate a .json file with the changes made. The file will describe the operation (update, insert, or delete), the table the operation applies to, and include the data. Clicking this button will also clear any changes since the last time changes were saved. Note that rules are not fired for delete events.
The goal would then be for a VS Code user to run the sim application. They then could make changes to the data using the grid, and when they click "save" they would see their rules execute.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This is proposal to support the ability to make manual changes to data stored in a Gaia database and have the rules in their application be executed.
The scenario would enable updating a grid in the data navigator of the Gaia Tools VS Code extension, clicking a button to "save changes". After the changes are saved, they would see console output from a new "sim" target that shows trace logging from the rules engine as well as any application specific logging inside the rules (or functions that the rules call).
Rule tracing can be turned on by changing the log level of the
rules
logger in the gaia_log.conf file. Additionally or alternatively, user-defined logging using theapp
logger could also output to the console (and therefore seen) by a user using the VS Code extension.At a high level, this proposal involves the following changes:
main
function whose purpose is to use a file watcher to see changes to a.json
file that has a description of all the changes made by the user in an updatable grid. When this file changes, the generated code in main would read the file, open a transaction, use a reflection API to write changes to the database, and commit the transaction..json
file with the changes made. The file will describe the operation (update, insert, or delete), the table the operation applies to, and include the data. Clicking this button will also clear any changes since the last time changes were saved. Note that rules are not fired for delete events.The goal would then be for a VS Code user to run the sim application. They then could make changes to the data using the grid, and when they click "save" they would see their rules execute.
Beta Was this translation helpful? Give feedback.
All reactions