from db.repository import Repository
from db.entities import Layer

from flask import request, Response
from typing import List, Dict

repo = Repository()

#region nodes



def nodes_for_use_case(use_case: str) -> List[Dict]:
    res = repo.get_nodes_for_use_case(use_case)
    return res

def nodes_for_use_case_and_table(use_case: str, table_name: str) -> List[Dict]:
    res = repo.get_nodes_for_use_case_and_table(use_case, table_name)
    return res

def nodes_for_use_case_and_table_and_layer(layer_name: str, use_case: str, table_name: str) -> List[Dict]:
    res = repo.get_nodes_for_use_case_and_table_and_layer(layer_name, use_case, table_name)
    return res