This module defines the structure of the parser information used to pass information of the data model from an ERD-term to the SQL-Translator which is part of currypp. It consists of a tuple of the path to the corresponding database as string, and the name of the corresponding CDBI-module as String, a list or tupels mapping relationships to their types, a list of tupels representing column names and a nullable flag, a list of tupels of table name and list of corresponding column names, a list of tupels representing column name and its type as string. Furthermore a getter function for each part of the information is defined returning it as FM instead of a list. A lookup function for relationships is provided either.
dbName
:: ParserInfo -> String
Getter for path to used database. |
cdbiModule
:: ParserInfo -> String
Getter for CDBI-module-name |
getRelations
:: ParserInfo -> Map String (Map String [(String,RelationType)])
Getter for relationships represented as nested FM for faster access. |
getNullables
:: ParserInfo -> Map String Bool
Getter for nullable-flag returned as a FM |
getAttrList
:: ParserInfo -> Map String (String,[String])
Getter for for lists of attributes (columns) returned as FM. |
getTypes
:: ParserInfo -> Map String String
Getter for column types returnd as FM. |
lookupRel
:: (String,String,String) -> Map String (Map String [(String,RelationType)]) -> Maybe (RelationType,String)
Lookup function for RelationFM. |
Type synonyms for all parts of the parser information
Type synonym: RelationFM = Map String (Map String [(String,RelationType)])
Type synonym: NullableFM = Map String Bool
Type synonym: AttributesFM = Map String (String,[String])
Type synonym: AttrTypeFM = Map String String
Basic data type for parser information.
Constructors:
PInfo
:: String -> String -> RelationTypes -> NullableFlags -> AttributeLists -> AttributeTypes -> ParserInfo
Data type representing possible relationships in the relational model.
Constructors:
MtoN
:: String -> RelationType
NtoOne
:: String -> RelationType
OnetoN
:: String -> RelationType
Getter for path to used database.
|
Getter for CDBI-module-name
|
Getter for relationships represented as nested FM for faster access. |
Getter for nullable-flag returned as a FM |
Getter for for lists of attributes (columns) returned as FM. |
Getter for column types returnd as FM. |
Lookup function for RelationFM. In case of success return tuple of relation type and original notation. |