library/src/databases/sqlite/BP-DBSqlite.cc
// clear all queries within sqli->queries registry.
clear all queries within sqli->queries registry.
clear all queries within sqli - > queries registry .
BP_ERROR_T BP_SQLiteClearQueryCache
(
	P_BP_DB_SQLITE sqli
)
{
	if(!sqli)
		return ERR_FAILURE;
	if(!sqli->queries)
		return ERR_FAILURE;
	BP_HASH_TABLE_ENTER_CRITICAL_SECTION(sqli->system_hreg);
	BP_DestroyHashTableRegistry(sqli->queries);
	sqli->queries = NULL;
	sqli->last_query_generated_results = BP_FALSE;
	sqli->last_query_param_n           = 0;
	sqli->last_query_ran_ok            = BP_FALSE;
	sqli->last_query_reported_error    = BP_FALSE;
	sqli->last_query_uuid              = NULL;
	sqli->last_result_query_uuid       = NULL;
	BP_HASH_TABLE_LEAVE_CRITICAL_SECTION(sqli->system_hreg);
	return ERR_SUCCESS;
}
BP_ERROR_T BP_SQLiteClearQueryCache ( P_BP_DB_SQLITE sqli ) { if ( ! sqli ) return ERR_FAILURE ; if ( ! sqli -> queries ) return ERR_FAILURE ; BP_HASH_TABLE_ENTER_CRITICAL_SECTION ( sqli -> system_hreg ) ; BP_DestroyHashTableRegistry ( sqli -> queries ) ; sqli -> queries = NULL ; sqli -> last_query_generated_results = BP_FALSE ; sqli -> last_query_param_n = 0 ; sqli -> last_query_ran_ok = BP_FALSE ; sqli -> last_query_reported_error = BP_FALSE ; sqli -> last_query_uuid = NULL ; sqli -> last_result_query_uuid = NULL ; BP_HASH_TABLE_LEAVE_CRITICAL_SECTION ( sqli -> system_hreg ) ; return ERR_SUCCESS ; }
clear all queries within sqli->queries registry.
clear all queries within sqli - > queries registry .
// ensure we have a sqli pointer // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // %%% Enter Critical Section and Add Param %%% // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // enter critical section // destroy queries registry (frees all memory associated) // nullify // reset all "last" indicators // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // %%% Leave Critical Section and Exit %%%%%%%% // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // leave critical section // return indicating success