static int initialized;
if (initialized) {
- __STC_LOG_FUNC_EXIT__;
- return SQLITE_OK;
+ __STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
+ return SQLITE_OK; //LCOV_EXCL_LINE
}
PREPARE_DELETE(delete_counter, DELETE_COUNTER);
static int initialized;
if (initialized) {
- __STC_LOG_FUNC_EXIT__;
- return SQLITE_OK;
+ __STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
+ return SQLITE_OK; //LCOV_EXCL_LINE
}
PREPARE_SELECT(select_counter, SELECT_COUNTER);
static int initialized;
if (initialized) {
- __STC_LOG_FUNC_EXIT__;
- return SQLITE_OK;
+ __STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
+ return SQLITE_OK; //LCOV_EXCL_LINE
}
PREPARE_UPDATE(update_counter, UPDATE_COUNTER);
do {
rc = sqlite3_step(stmt);
+ //LCOV_EXCL_START
switch (rc) {
case SQLITE_DONE:
break;
error_code = STC_ERROR_DB_FAILED;
}
+ //LCOV_EXCL_STOP
} while (rc == SQLITE_ROW);
handle_error:
return error_code;
}
+//LCOV_EXCL_START
stc_error_e table_counters_update_counters(const table_counters_info *info)
{
stc_error_e error_code = STC_ERROR_NONE;
sqlite3_reset(stmt);
return error_code;
}
+//LCOV_EXCL_STOP
stc_error_e table_counters_delete(uint64_t restriction_id)
{
DB_ACTION(sqlite3_bind_int64(stmt, 1, restriction_id));
if (sqlite3_step(stmt) != SQLITE_DONE) {
- STC_LOGE("Failed to delete counter: %s\n",
+ STC_LOGE("Failed to delete counter: %s\n", //LCOV_EXCL_LINE
sqlite3_errmsg(stc_db_get_database()));
- error_code = STC_ERROR_DB_FAILED;
- goto handle_error;
+ error_code = STC_ERROR_DB_FAILED; //LCOV_EXCL_LINE
+ goto handle_error; //LCOV_EXCL_LINE
}
STC_LOGD("Counter deleted for restriction_id [%llu]", restriction_id);
stc_error_e error_code = STC_ERROR_NONE;
if (db == NULL) {
- __STC_LOG_FUNC_EXIT__;
- return STC_ERROR_FAIL;
+ __STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
+ return STC_ERROR_FAIL; //LCOV_EXCL_LINE
}
DB_ACTION(__prepare_delete(db));