LanX has asked for the wisdom of the Perl Monks concerning the following question:
I'm most probably reinventing the wheel
I had to write a parser to parse mysql types like
I tried DBI::column_info and querying information_schema.`COLUMNS` but couldn't get anything which didn't required writing a parser.
My job involves writing many HTML/JS GUIs for our data models and my colleagues are quite "agile" in changing data-models on the fly. Our schemas are replicated (but not synchronized) on different servers.
Now I'm trying to automate type-checking and form generation on the GUI level.
Such that enum('Y','N') results in a [ ] check box and enum('export','import','view') in a select menu.
actually using DBI::column_info I'm getting quite detailed informations for enum
mysql_type_name => "enum('Y','N')", mysql_values => ["Y", "N"], TYPE_NAME => "ENUM",
but informations like unsigned and zerofill seem to get lost.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
fixed format issue, thanks stevieb++
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Querying and parsing MySQL data types
by kschwab (Vicar) on Nov 30, 2018 at 22:19 UTC | |
by LanX (Saint) on Nov 30, 2018 at 22:35 UTC |