summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2015-02-22 07:07:40 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-22 07:48:22 -0800
commitad5503fec5f45ee9374b690828b67fcc622de065 (patch)
tree2ba8328e613ed4ffa277810b6c87ce44a6d98990
parent27d0cd68fcafc8c6a73b5d36b158929a24996406 (diff)
downloadsubsurface-ad5503fec5f45ee9374b690828b67fcc622de065.tar.gz
Clean DM5 sql query
We don't use the data coming from DiveMixture so removing the join. The join did also generate extra rows of the same dive (with differing gas info). Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--parse-xml.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse-xml.c b/parse-xml.c
index 530a41db3..3d50bcd26 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -2407,7 +2407,7 @@ int parse_dm5_buffer(sqlite3 *handle, const char *url, const char *buffer, int s
/* StartTime is converted from Suunto's nano seconds to standard
* time. We also need epoch, not seconds since year 1. */
- char get_dives[] = "select D.DiveId,StartTime/10000000-62135596800,Note,Duration,coalesce(SourceSerialNumber,SerialNumber),Source,MaxDepth,SampleInterval,StartTemperature,BottomTemperature,D.StartPressure,D.EndPressure,Size,CylinderWorkPressure,SurfacePressure,DiveTime,SampleInterval,ProfileBlob,TemperatureBlob,PressureBlob,Oxygen,Helium,MIX.StartPressure,MIX.EndPressure,SampleBlob FROM Dive AS D JOIN DiveMixture AS MIX ON D.DiveId=MIX.DiveId";
+ char get_dives[] = "select DiveId,StartTime/10000000-62135596800,Note,Duration,coalesce(SourceSerialNumber,SerialNumber),Source,MaxDepth,SampleInterval,StartTemperature,BottomTemperature,StartPressure,EndPressure,'','',SurfacePressure,DiveTime,SampleInterval,ProfileBlob,TemperatureBlob,PressureBlob,'','','','',SampleBlob FROM Dive";
retval = sqlite3_exec(handle, get_dives, &dm5_dive, handle, &err);