from typing import Dict, Union

from typing_extensions import Literal

from graph.ingestion.dataiku.data_types import DataikuDataType

# Neo4j Data Types: https://neo4j.com/docs/cypher-manual/current/values-and-types/property-structural-constructed/
Neo4jDataType = Union[
    Literal["STRING"],
    Literal["BOOLEAN"],
    Literal["DATE"],
    Literal["INTEGER"],
    Literal["FLOAT"],
]

TYPE_MAPPING_DATAIKU_NEO4J: Dict[DataikuDataType, Neo4jDataType] = {
    "object": "STRING",
    "string": "STRING",
    "boolean": "BOOLEAN",
    "date": "DATE",
    "tinyint": "INTEGER",
    "smallint": "INTEGER",
    "int": "INTEGER",
    "bigint": "INTEGER",
    "float": "FLOAT",
    "double": "FLOAT",
}
