[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Health-dev] [task #16242] Avoid usage of raw sql queries
From: |
Sergi Almacellas Abellana |
Subject: |
[Health-dev] [task #16242] Avoid usage of raw sql queries |
Date: |
Thu, 4 Aug 2022 09:34:01 -0400 (EDT) |
URL:
<https://savannah.gnu.org/task/?16242>
Summary: Avoid usage of raw sql queries
Project: GNU Health
Submitter: pokoli
Submitted: jue 04 ago 2022 13:34:00 UTC
Should Start On: jue 04 ago 2022 00:00:00 UTC
Should be Finished on: sáb 31 dic 2022 00:00:00 UTC
Category: Tryton
Priority: 5 - Normal
Status: In Progress
Privacy: Public
Percent Complete: 80%
Assigned to: pokoli
Open/Closed: Open
Release: None
Discussion Lock: Any
Module: health
Component: Hospital Management
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: jue 04 ago 2022 13:34:00 UTC By: Sergi Almacellas Abellana <pokoli>
Using raw sql queries produces some issues when running on other backends. For
example it is not possible to run the tests suite on sqlite because the SQL
queries used for PostgreSQL are not valid for sqlite.
As tryton supports python-sql and makes the configuration between all backend
automatically, we just need to ensure that python-sql is used everywhere (or
use the ORM when possible) to make the code compatible with sqlite.
I attach a diff that replaces all raw sql queries with the equivalent version
of the ORM/python-sql
It will be great if it can be tested before commiting to the main repo. I
think I replaced all the required code, just let me know if there is some
query missing and I will update the patch.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/task/?16242>
_______________________________________________
Mensaje enviado vía Savannah
https://savannah.gnu.org/
- [Health-dev] [task #16242] Avoid usage of raw sql queries,
Sergi Almacellas Abellana <=