import { getMergedPropertyWithNamespace , getPropertyFromEntityContainer , parseComplexTypesBase , parseEntitySetsBase , parseEntityTypesBase } from '../common/edmx-parser' ; import { EdmxComplexTypeBase , EdmxEntitySetBase } from '../common' ; import { forceArray } from '../../generator-utils' ; import { EdmxAssociation , EdmxAssociationSet , EdmxEntityTypeV2 , EdmxFunctionImportV2 } from './edm-types' ; internal export function parseComplexTypesV2 ( root ) { return parseComplexTypesBase ( root ) ; } internal export function parseEntitySetsV2 ( root ) { return parseEntitySetsBase ( root ) ; } internal export function parseEntityTypes ( root ) { return parseEntityTypesBase ( root ) ; } internal export function parseAssociation ( root ) { return getMergedPropertyWithNamespace ( root , 'Association' ) ; } internal export function parseAssociationSets ( root ) { return getPropertyFromEntityContainer ( root , 'AssociationSet' ) ; } internal export function parseFunctionImportsV2 ( root ) { return getPropertyFromEntityContainer ( root , 'FunctionImport' ) . map ( f => ( { ... f , Parameter : forceArray ( f . Parameter ) } ) ) ; }