dbtableprinter
dbtableprinter copied to clipboard
Corrected Parsing Problem
@htorun Every thing works fantastic besides one thing. When there is a column of number datatype in SQL table, it creates some parsing problem. Please refer this image:

I have tried to make necessary changes and now its working fine. Please review and let me know what you think!
here is the screenshot of what result i got after changes i made

Looks good. Thanks a lot. Merging it now.
Actually, I just realized that you included the NUMERIC data type under CATEGORY_INTEGER. Since NUMERIC is like DECIMAL and can store a decimal number, in order to be formatted correctly it should go under CATEGORY_DOUBLE. (I also realized that CATEGORY_DECIMAL or CATEGORY_REAL would be a better name for CATEGORY_DOUBLE :) )
@htorun yes i also realized this after raising the pull request. I will work on it. And will commit changes to my branch asap. :)
I also encountered this problem on Oracle, and the fix I had was to also get the scale of the column from the ResultSetMetadata, store that on the Column, and change whichCategory to operate on a Column instead of just a int type since choosing the correct java.sql.Type requires more information (e.g. Type.NUMERIC can either be an Integer or Decimal depending on the scale)