Ignoring values of TOTAL_* details when fetching interface data. 83/140683/2 accepted/tizen/4.0/unified/20170816.013628 accepted/tizen/4.0/unified/20170816.020059 accepted/tizen/unified/20170728.195400 submit/tizen/20170727.063916 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170814.115522 submit/tizen_4.0_unified/20170814.115522
authorNishant Chaprana <n.chaprana@samsung.com>
Wed, 26 Jul 2017 05:01:13 +0000 (10:31 +0530)
committerNishant Chaprana <n.chaprana@samsung.com>
Wed, 26 Jul 2017 05:19:03 +0000 (10:49 +0530)
Description: When fetching interface related data and chunk data
TOTAL_IPV4, TOTAL_IPV6, TOTAL_WIFI, TOTAL_BLUETOOTH, TOTAL_DATACALL
app_id were increasing redundant data in fetch query.

Change-Id: Icc074219dfd9e83832d7f193040969fd23a30d43
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
packaging/stc-manager.spec
src/database/tables/table-statistics.c

index fafa1dd..a15bc75 100644 (file)
@@ -1,6 +1,6 @@
 Name:       stc-manager
 Summary:    STC(Smart Traffic Control) manager
-Version:    0.0.27
+Version:    0.0.28
 Release:    0
 Group:      Network & Connectivity/Other
 License:    Apache-2.0
index 9564d8e..1b6d288 100755 (executable)
 #define SELECT_TOTAL "select iftype, hw_net_protocol_type, " \
        "is_roaming, sum(received) as received, sum(sent) as sent, " \
        "ifname, imsi, ground from statistics " \
-       " where (time_stamp between ? and ?) and binpath != 'TOTAL_DATACALL' " \
-       "and binpath != 'TOTAL_WIFI' and binpath != 'TOTAL_BLUETOOTH' " \
-       "and binpath != 'TOTAL_IPV4' and binpath != 'TOTAL_IPV6' " \
+       "where (time_stamp between ? and ?) " \
+       "and binpath NOT LIKE 'TOTAL_%' " \
        "group by iftype, ifname, imsi, hw_net_protocol_type, is_roaming " \
        "order by time_stamp, iftype, ifname, imsi, hw_net_protocol_type, " \
        "is_roaming"
 #define SELECT_TOTAL_IFACE "select iftype, hw_net_protocol_type, " \
        "is_roaming, sum(received) as received, sum(sent) as sent, " \
        "ifname, imsi, ground from statistics " \
-       " where (time_stamp between ? and ?) " \
-       "and iftype=? " \
+       "where (time_stamp between ? and ?) and iftype=? " \
+       "and binpath NOT LIKE 'TOTAL_%' " \
        "group by hw_net_protocol_type, is_roaming, " \
        "iftype, ifname, imsi " \
        "order by time_stamp, iftype, ifname, imsi, hw_net_protocol_type, " \
        "is_roaming, sum(received) as received, sum(sent) as sent, " \
        "ifname, imsi, ground, time_stamp - time_stamp % ? as time_stamp " \
        "from statistics where time_stamp between ? and ? " \
+       "and binpath NOT LIKE 'TOTAL_%' " \
        "group by time_stamp, iftype, ifname, imsi, hw_net_protocol_type, " \
        "is_roaming " \
        "order by time_stamp, iftype, ifname, imsi, hw_net_protocol_type, " \
        "ifname, imsi, ground, time_stamp - time_stamp % ? as time_stamp " \
        "from statistics where time_stamp between ? and ? " \
        "and iftype = ? " \
+       "and binpath NOT LIKE 'TOTAL_%' " \
        "group by time_stamp, hw_net_protocol_type, is_roaming, iftype, ifname, imsi " \
        "order by time_stamp, hw_net_protocol_type, is_roaming, iftype, " \
        "ifname, imsi"