public static function makeFromRelation( PgClass $relation )
    {

        $output = array();

        foreach( $relation->getAttributes() as $attribute ) {
            $dataType = static::makeFromAttribute( $attribute );
            $output[$dataType->name] = $dataType;
        }

        return $output;

    }