summaryrefslogtreecommitdiff
path: root/src/components/policy/src/policy/src/sql_pt_ext_queries.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/policy/src/policy/src/sql_pt_ext_queries.cc')
-rw-r--r--src/components/policy/src/policy/src/sql_pt_ext_queries.cc26
1 files changed, 19 insertions, 7 deletions
diff --git a/src/components/policy/src/policy/src/sql_pt_ext_queries.cc b/src/components/policy/src/policy/src/sql_pt_ext_queries.cc
index ae6666461..776b31899 100644
--- a/src/components/policy/src/policy/src/sql_pt_ext_queries.cc
+++ b/src/components/policy/src/policy/src/sql_pt_ext_queries.cc
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (c) 2013, " Ford Motor Company
All rights reserved.
@@ -67,9 +67,9 @@ const std::string kUpdateDevice =
" `connection_type` = ? WHERE `id` = ? ";
const std::string kInsertDeviceConsentedGroup =
- "INSERT OR IGNORE INTO `device_consent_group` "
- "(`device_id`, `functional_group_id`, `is_consented`, `input`) "
- "VALUES (?,?,?,?)";
+ "INSERT OR REPLACE INTO `device_consent_group` "
+ "(`device_id`, `functional_group_id`, `is_consented`, `input`, `time_stamp`) "
+ "VALUES (?,?,?,?,?)";
const std::string kInsertDevice =
"INSERT OR IGNORE INTO `device` "
@@ -113,15 +113,21 @@ const std::string kSelectAppLevels =
" `app_registration_language_gui`, "
" `app_registration_language_vui` "
"FROM `app_level`";
+
+const std::string kUpdateGlobalCounters = "UPDATE `usage_and_error_count` SET "
+ "`count_of_iap_buffer_full` = ?, "
+ "`count_sync_out_of_memory` = ?, "
+ "`count_of_sync_reboots` = ? ";
+
const std::string kInsertDeviceData =
"INSERT OR IGNORE INTO `device` "
"(`id`, `hardware`, `firmware_rev`, `os`, `os_version`, `carrier`, "
"`max_number_rfcom_ports`,`connection_type`) VALUES (?,?,?,?,?,?,?,?) ";
const std::string kInsertConsentGroups =
- "INSERT OR IGNORE INTO `consent_group` "
- "(`device_id`, `application_id`, `functional_group_id`, `is_consented`, `input`) "
- "VALUES (?,?,?,?,?)";
+ "INSERT OR REPLACE INTO `consent_group` "
+ "(`device_id`, `application_id`, `functional_group_id`, `is_consented`, `input`, `time_stamp`) "
+ "VALUES (?,?,?,?,?,?)";
const std::string kDeleteAppGroupConsent = "DELETE FROM `consent_group` WHERE "
"`application_id` = ? AND `functional_group_id` = ? ";
@@ -155,6 +161,12 @@ const std::string kUpdateMetaParams = "UPDATE `module_meta` SET "
const std::string kUpdateModuleMetaVinParam =
"UPDATE `module_meta` SET `vin` = ? ";
+const std::string kSaveModuleMeta =
+ "UPDATE `module_meta` SET `ccpu_version` = ?, `language` = ?,"
+ "`wers_country_code` = ?, `pt_exchanged_at_odometer_x` = ?,"
+ "`pt_exchanged_x_days_after_epoch` = ?,"
+ "`ignition_cycles_since_last_exchange` = ?, `vin` = ?";
+
const std::string kSelectMetaParams = "SELECT `ccpu_version`, "
"`wers_country_code`, `language` from `module_meta`";