-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automate updates of main cover and main wastewater node #97
Conversation
Function is now included in teksi#97
LEFT JOIN tww_od.structure_part sp ON sp.fk_wastewater_structure = ws.obj_id | ||
LEFT JOIN tww_od.cover co ON sp.obj_id = co.obj_id | ||
LEFT JOIN tww_od.channel ch ON ch.obj_id = ws.obj_id | ||
WHERE (_all OR ws.obj_id = _obj_id ) AND ch.obj_id IS NULL AND ws.fk_main_cover IS NULL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my question here is regarding ws.fk_main_cover IS NULL
if we use _all
, don't we expect to run on all?
or can we assume, that we will never need to fix this data?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: 3 input options:
_obj_id: as is
_all : as is
_all_nulls: for automated imports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep 2, but combine them
_obj_id = XXX => do XXX (don't care about NULL=
_obj_id NULL and _all is false => do only NULLs
_all is TRUE => do all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so calling without args would be the automated import
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. Do we want this setup for all the symbology functions with the arguments _obj_id and _all?
Co-authored-by: Denis Rouzaud <[email protected]>
Co-authored-by: Denis Rouzaud <[email protected]>
* update main cover if new cover is added and fk is null * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * remove "case" * use lowercase for alias * code layout * remove function from PR Function is now included in #97 * Update function name * Add default NULL on _obj_id and documentation --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Denis Rouzaud <[email protected]>
As discussed in TEKSI Feedbacks session from 19.01.2024. Entry point for interlis import in plugin.
Edit concerning the final PR: calling the functions with obj_id=NULL and _all=false, i.e. tww_app.wastewater_structure_update_fk_main_cover(NULL), only the entries where the main cover currently is NULL are updated.