Repository navigation
Read and edit a database's own parameters, and restate what reads them - #684
Merged
Merged
Conversation
A database's own parameters, the ones every process reads unless it
defines its own of the same name, can now be read with
`GET /db/{db}/parameters` and set or removed with
`POST /db/{db}/parameters` (`setParameters`, `removeParameters`).
Every process that reads an edited parameter, directly or through a
calculated one, is restated as an edit of that process would restate it,
and the answer lists the processes that moved. Example: the database has
`salt_kg = 0.01` and `salt_g = salt_kg * 1000`, and a flour process has a
line `salt_g / 100` (0.1 kg). Setting `salt_kg` to 0.02 moves that line
to 0.2 kg, and `salt_g` shows 20.
Refused, with the reason: the checks of an activity's parameters (a name
that is not one word of the language, a second spelling, a value that is
not finite, a formula that does not read or loops); removing a parameter
that a formula still reads, naming the readers; an edit that leaves a
process without a value, or a calculated parameter read by no process
newly without one; a change that moves an allocation share.
Journal op `parameters`. REST, the assistant's `get_database_parameters`
and `edit_database_parameters`, pyvolca `database_parameters()` and
`edit_database_parameters()`. Reading them needs the licence to read the
inventory. Wire revision 74.
… infinite, and let a removal ignore formulas removed with it Restating takes the process before the edit as a record of its own, so the before and after cannot be swapped. A calculated parameter of the database that the edit leaves without a finite number is refused, as one of a process is: with per_salt = 1 / salt_kg, setting salt_kg to 0 is refused. Removing a parameter is no longer held back by a formula the same edit removes, so the order of the removals does not matter.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Read and edit a database's own parameters, and restate what reads them
A database's own parameters, the ones every process reads unless it
defines its own of the same name, can now be read with
GET /db/{db}/parametersand set or removed withPOST /db/{db}/parameters(setParameters,removeParameters).Every process that reads an edited parameter, directly or through a
calculated one, is restated as an edit of that process would restate it,
and the answer lists the processes that moved. Example: the database has
salt_kg = 0.01andsalt_g = salt_kg * 1000, and a flour process has aline
salt_g / 100(0.1 kg). Settingsalt_kgto 0.02 moves that lineto 0.2 kg, and
salt_gshows 20.Refused, with the reason: the checks of an activity's parameters (a name
that is not one word of the language, a second spelling, a value that is
not finite, a formula that does not read or loops); removing a parameter
that a formula still reads, naming the readers; an edit that leaves a
process without a value, or a calculated parameter read by no process
newly without one; a change that moves an allocation share.
Journal op
parameters. REST, the assistant'sget_database_parametersand
edit_database_parameters, pyvolcadatabase_parameters()andedit_database_parameters(). Reading them needs the licence to read theinventory. Wire revision 74.