mirror of
https://github.com/sandronator/finetuning_aufgabe4.git
synced 2026-09-04 08:36:09 +02:00
20 lines
683 B
Python
20 lines
683 B
Python
from repositories.hash_join_resolver import resolve
|
|
from baseStrategy import BaseStrategy
|
|
|
|
class HashJoinStrategy(BaseStrategy):
|
|
def __init__(self, conn, db_name, all_queries):
|
|
self.BASENAME = "Hash Join "
|
|
|
|
super().__init__(conn, db_name, all_queries)
|
|
|
|
def run(self, aufgabe: str | None = None):
|
|
if self.db_name not in resolve:
|
|
raise Exception("Hash Join not supported for " + self.db_name)
|
|
|
|
for disable in resolve[self.db_name]["disable"]:
|
|
self.cursor.execute(disable)
|
|
|
|
super().run(aufgabe=aufgabe)
|
|
|
|
for reset in resolve[self.db_name]["reset"]:
|
|
self.cursor.execute(reset) |