[Top][All Lists]

[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)


                 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:


Mensaje enviado vía Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]