You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Actually, more of an annoyance instead of a bug.
CREATE TABLE pole.t_spiel (
id varchar(10) NOT NULL, -- Comment 0
refprodid varchar(10) NOT NULL, -- Comment 1 // references is empty
titel varchar(100) NOT NULL, -- Comment 2
datum date NOT NULL,
uhrzeit time NOT NULL,
dauer int4 NOT NULL, -- Comment 3, should be 5
CONSTRAINT t_spiel_pk PRIMARY KEY (id),
CONSTRAINT foreign_key_t_produktion FOREIGN KEY (refprodid) REFERENCES pole.t_produktion (id)
);
The above ddl demonstrates two issues:
I would expect that the field references in the column describing refprodid would contain pole.t_produktion (id), but it is empty.
The comments are all parsed but such, that the connection to the corresponding field is lost, because fields without comments are left out. Several ways to solve:
a) create entries with empty strings, where no comment exists
b) create a dictionary of comments instead, where the key is the field name and the value is the comment
c) create a new field "comment" as part of the column (preferable in my opinion).
Why do I need this? I do a postprocessing of the parsed structure in which I take the comments as hints for the users and additionally to qualify the fields for their presentation. Currently, I've programmed a workaround, but of course, I'd prefer if simply-ddl-parser would support this in the first place.
To Reproduce
Parse with simple_ddl_parser
Desktop (please complete the following information):
OS: Kubuntu
Python 3.12
Postgres
The text was updated successfully, but these errors were encountered:
Describe the bug
Actually, more of an annoyance instead of a bug.
The above ddl demonstrates two issues:
I would expect that the field
references
in the column describingrefprodid
would containpole.t_produktion (id)
, but it is empty.The comments are all parsed but such, that the connection to the corresponding field is lost, because fields without comments are left out. Several ways to solve:
a) create entries with empty strings, where no comment exists
b) create a dictionary of comments instead, where the key is the field name and the value is the comment
c) create a new field "
comment
" as part of thecolumn
(preferable in my opinion).Why do I need this? I do a postprocessing of the parsed structure in which I take the comments as hints for the users and additionally to qualify the fields for their presentation. Currently, I've programmed a workaround, but of course, I'd prefer if simply-ddl-parser would support this in the first place.
To Reproduce
Parse with simple_ddl_parser
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: