Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple word type in erDiagram attributes #3426

Open
marcosh opened this issue Sep 7, 2022 · 3 comments
Open

multiple word type in erDiagram attributes #3426

marcosh opened this issue Sep 7, 2022 · 3 comments

Comments

@marcosh
Copy link

marcosh commented Sep 7, 2022

As far as I understand it, when defining attributes in a erDiagram, both type and name need to be single words.

I am trying to define an erDiagram where I would like to use Haskell types instead of database types, to keep a more high-level vision.
The issue is that I have types like Id Person, which consists of two words and this breaks the parser.

The same issue would arise trying to use the integer ARRAY syntax for Postgres.

Would it be possible to have a way to declare types with more than one word? Maybe using " or {} or whatever else is commonly used in Mermaid

@marcosh marcosh added Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request labels Sep 7, 2022
@jgreywolf
Copy link
Contributor

You could always use _. Otherwise, enclosing the text in quotes could work as well. Something to look at.

@jgreywolf jgreywolf added Contributor needed Status: Approved Is ready to be worked on Good first issue! Graph: Entity Relationship and removed Status: Triage Needs to be verified, categorized, etc labels Oct 6, 2023
@Mikek16
Copy link

Mikek16 commented Nov 27, 2023

Screenshot from 2023-11-26 22-54-54

It seems like declaring multi-word types/attributes with double quotes was added with PR #3516, should this issue be closed?

@f355
Copy link

f355 commented Nov 28, 2023

@Mikek16 no, this is about entity FIELD types and names, not about the names of entities themselves, e.g. currently there's no way to make this snippet work:

erDiagram
  CUSTOMER {
    std::string name
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants