void SQLiteDBInstance::clearAffectedTables() {
  if (isPrimary() && !managed_) {
    // A primary instance must forward clear requests to the DB manager's
    // 'connection' instance. This is a temporary primary instance.
    SQLiteDBManager::getConnection(true)->clearAffectedTables();
    return;
  }

  for (const auto& table : affected_tables_) {
    table.second->constraints.clear();
    table.second->cache.clear();
    table.second->colsUsed.clear();
    table.second->colsUsedBitsets.clear();
  }
  // Since the affected tables are cleared, there are no more affected tables.
  // There is no concept of compounding tables between queries.
  affected_tables_.clear();
  use_cache_ = false;
}
void SQLiteDBInstance::clearAffectedTables() {
  if (isPrimary() && !managed_) {
     
     
    SQLiteDBManager::getConnection(true)->clearAffectedTables();
    return;
  }

  for (const auto& table : affected_tables_) {
    table.second->constraints.clear();
    table.second->cache.clear();
    table.second->colsUsed.clear();
    table.second->colsUsedBitsets.clear();
  }
   
   
  affected_tables_.clear();
  use_cache_ = false;
}