mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-21 20:19:23 +01:00
Change SQL requests
This commit is contained in:
parent
b35b57e437
commit
b2c60c8c24
3 changed files with 4 additions and 4 deletions
|
@ -82,7 +82,7 @@ public class UtilDate {
|
|||
* @return int numbers of days between date and today
|
||||
* Number of days between date (older than today) and today
|
||||
*/
|
||||
static int nbOfDaysBetweenDateAndToday(Date date) {
|
||||
public static int nbOfDaysBetweenDateAndToday(Date date) {
|
||||
Date oldDate = dateAtNoon(date); // Be sure that the old date is at Noon
|
||||
Date todayDate = dateAtNoon(new Date()); // Be sure that we use today at Noon
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ public interface MedicinesDAO {
|
|||
@Query("SELECT * FROM drugs")
|
||||
List<Medicine> getAllMedicines();
|
||||
|
||||
@Query("SELECT * FROM drugs WHERE cip13 = :cip13")
|
||||
@Query("SELECT COALESCE(label_group,name), * FROM drugs WHERE cip13 = :cip13")
|
||||
Medicine getMedicineByCIP13(String cip13);
|
||||
|
||||
@Query("SELECT count(*) FROM drugs")
|
||||
|
|
|
@ -21,10 +21,10 @@ public interface PrescriptionsDAO {
|
|||
@Delete
|
||||
void delete(Prescription prescription);
|
||||
|
||||
@Query("SELECT * FROM prescriptions")
|
||||
@Query("SELECT COALESCE(label_group,name), * FROM prescriptions")
|
||||
List<Prescription> getAllMedics();
|
||||
|
||||
@Query("SELECT * FROM prescriptions WHERE cip13 = :cip13")
|
||||
@Query("SELECT COALESCE(label_group,name), * FROM prescriptions WHERE cip13 = :cip13")
|
||||
Prescription getMedicByCIP13(String cip13);
|
||||
|
||||
@Query("SELECT count(*) FROM prescriptions")
|
||||
|
|
Loading…
Reference in a new issue