Skip to content

Parser doesn't support multiline column settings #48

@aardjon

Description

@aardjon

Hi,

sometimes I like to add line breaks between column settings to improve readability, especially when providing notes or a lot of settings. The following is (to the best of my knowledge) valid DBML which can be rendered just fine by https://dbdiagram.io:

Table fancy_table {
  column1 integer [
    not null,
    unique,
    note:'Some description.'
  ]
}

However, PyDBML(...) raises an error:

pyparsing.exceptions.ParseException: Expected ']', found ','  (at char 52), (line:3, col:13)

When putting the whole column definition into one line, the DBML can be parsed properly:

Table fancy_table {
  column1 integer [not null, unique, note:'Some description.']
}

Can you please improve the parser to allow line breaks between list items? (I'm using PyDBML 1.1.1.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions