"""
Module holding DynaODBCConnector private constants.
"""

class _ErrFmts:
    """
    Class holding the Connector error message formats
    """
    errmsg_convert_fail = "Failed to convert '%s': %s"
    errmsg_convert_fun = "Error using convert function '%s' with query '%s' and action '%s': %s"
    errmsg_read_index = "Failed to read index %d: %s"
    errmsg_invalid_position = "Invalid position: %s"
    errmsg_create_dm = "Failed to create DataMapping object: %s"
    errmsg_read_dm = "Failed to read data_mapping: %s"
    errmsg_invalid_action = "Invalid action name: %s"
    errmsg_read_am = "Failed to read action_mapping: %s"
    errmsg_invalid_query = "Invalid query string: %s"
    errmsg_read_qm = "Failed to read query_mapping: %s"
    errmsg_invalid_db_driver = "Invalid DB driver: %s"
    errmsg_invalid_db_server = "Invalid DB server: %s"
    errmsg_invalid_db_database = "Invalid DB database: %s"
    errmsg_invalid_db_username = "Invalid DB username: %s"
    errmsg_invalid_db_password = "Invalid DB password"
    errmsg_db_connect = "Failed to connect to DB: %s"
    errmsg_db_close = "Failed to close DB connection: %s"
    errmsg_db_execute = "Error executing query '%s': %s"
    errmsg_invalid_dyn_username = "Invalid Dynizer Username: %s"
    errmsg_invalid_dyn_password = "Invalid Dynizer password"
    errmsg_dyn_login = "Failed to log in Dynizer at: %s"
    errmsg_dyn_connect = "Failed to connect to Dynizer: %s"
    errmsg_config = "Failed to read connector config: %s"
    errmsg_type_detect = "Could not detect type of %s"
    errmsg_invalid_type = "Invalid data type provided"
    errmsg_create_action = "Error creating action '%s' for query '%s': %s"
    errmsg_create_topology = "Error creating topology '%s' for query '%s': %s"
    errmsg_create_labels = "Error creating labels '%s' for query '%s': %s"
    errmsg_create_instance = "Error creating instance #%d for query '%s': %s"
    errmsg_create_instances = "Error creating instances for query '%s': %s"
    errmsg_yield_object = "Error yielding %s of query '%s': %s"
    errmsg_yield_instance = "Error yielding instances of query '%s': %s"
    errmsg_not_implemented = "%s is not implemented"
    errmsg_python_type_not_supported = "%s not supported for type %s"

class _Keys:
    """
    Class holding the Connector json keys
    """
    component = "component"
    position = "position"
    data_type = "data_type"
    label = "label"
    convert_function = "convert_function"
    action_name = "action_name"
    data_mappings = "data_mappings"
    query_string = "query_string"
    action_mappings = "action_mappings"
    db_driver = "db_driver"
    db_server = "db_server"
    db_database = "db_database"
    db_username = "db_username"
    db_password = "db_password"
    dyn_server = "dyn_server"
    dyn_username = "dyn_username"
    dyn_password = "dyn_password"
    query_mappings = "query_mappings"
    ignore = "ignore"
