-
Notifications
You must be signed in to change notification settings - Fork 102
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
feat: log synthese route manage params #2345
Closed
Closed
Conversation
This file contains 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
Improving PR PnX-SI#1835 According to this comment : Supprimer l’usage de GenericQuery : la manière fléché par SQLAlchemy pour cela serait d’utiliser query_class ; on peut envisager de faire des fonctions de filtrage générique de cette manière mais il faut que cela soit bien réfléchit et bien couvert par les tests. Supprimer la vue v_log_synthese (plus difficile à maintenir) au profit d’une requête d’union directement dans la route Reviewed_by:andriac [Refs_PR]: PnX-SI#1835
Change down revision of `add_synthese_log_history` to target head of GN Branch develop Reviewed-by: andriacap
Remove `unique_id_sinp` from `t_log_synthese` It seems useless to keep ``unique_id_sinp` Reviewed-by: andriacap
Remove unused function in _get_model and _get_entity by usign call directly the model `Synthese` Reviewed-by: andriacap
- Add query_class for model SyntheseLogEntry - Manage params : multiple sort , multiple comparator on columns model (ref: PnX-SI#2273) Reviewed-by: andriacap [Refs PR]: PnX-SI#2337
Test trigger ON DELETE Synthese INSERT in t_log_synthese Test route /log Test sort list query function (column:asc and column:desc) Test sort params on route /log (?sort=last_action:asc&sort=meta_last_action_date:asc) WIP: Test on gt, lt, gte, lte (comparator date) Reviewed-by: andriac
PR reprise et intégré dans #2337 |
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.
Bonjour,
J'ai apporté les modifications basées sur ce commentaire #2337 (review).
Modifs réalisées
utils/routes.py
qui semblait superflu.SyntheseLogEntry
.sort
en params en me basant sur ce qui a été dit dans le ticket (ref: [Dev] Bonnes pratiques API RESTful : query string pour le tri #2273)meta_last_action_date
) en utilisant la syntaxe mentionnée par @TheoLechemia?meta_last_action_date:gt=<date iso 8601>
à l'exception que la date doit être au format 'YYYY-mm-dd' . J'utilise une fonction permettant de convertir la date au bon format@json_resp
(remplacé parjsonify
)Concernant la comparaison de date , je me base pour l'instant sur la syntaxe : gt, lt, gte, lte (> , <, >=, <=). Comme mentioné ici par Elie (ref: #2273), le sujet reste ouvert pour qu'il y ait un accord sur la bonne pratique à adopter.
Travail ajoutés:
Travail restant
Merci pour votre lecture.