refactor: refs #7817 itemShelving_addList change #2882
Labels
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix#2882
Loading…
Reference in New Issue
No description provided.
Delete Branch "7817-isChecked"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
refactor: refs #7817 itemShelving_addList changeto WIP: refactor: refs #7817 itemShelving_addList changeWIP: refactor: refs #7817 itemShelving_addList changeto refactor: refs #7817 itemShelving_addList change@ -32,4 +38,4 @@
AND itemFk = vItemFk;
END IF;
IF NOT (vIsChecking AND vIsChecked) THEN
Seria más legible sin el NOT y con un OR
@ -37,3 +43,3 @@
END IF;
UPDATE vn.itemShelving
UPDATE itemShelving
Revisar la lógica del procedimiento, no tiene sentido hacer este UPDATE si el parámetro vIsChecking = FALSE
Sí que tiene, porque ese campo puede tener NULL, TRUE o FALSE, si es NULL y la variables es FALSE, quieres que haga el UPDATE a FALSE
@ -0,0 +1,7 @@
UPDATE vn.itemShelving
SET isChecked = TRUE
WHERE isChecked;
AND isChecked <> 1
No fa falta, ho he comprovat.
@ -28,3 +34,2 @@
SELECT COUNT(*) INTO vIsChecked
FROM vn.itemShelving
SELECT IF(COUNT(*), TRUE, FALSE) INTO vIsChecked
altra forma de fer-ho:
SELECT COUNT(*) > 0 INTO checked