This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 158356 - SQL result column width/alignment inconvenient
Summary: SQL result column width/alignment inconvenient
Status: NEW
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All Windows Vista
: P4 blocker (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
: 136781 212965 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-02-11 06:05 UTC by nathanielkofalt
Modified: 2014-01-03 06:09 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Example of integer/double problem (25.35 KB, image/jpeg)
2009-02-11 06:06 UTC, nathanielkofalt
Details
The structure of the example table shown in the previous image (33.63 KB, image/jpeg)
2009-02-11 06:07 UTC, nathanielkofalt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nathanielkofalt 2009-02-11 06:05:24 UTC
When browsing a SQL server, the result window's columns are inconveniently arranged. A few minor issues that, if fixed,
could improve viability:

1) The column widths are not shrunk to the widest data shown, so the columns take up a lot of extra space. This is
inconvenient if you have a lot of double columns. Why not shrink the columns depending on the data shown, with some
wiggle room? Or have a visible option to do so?

2) Integers are aligned on the left side of their column, doubles on the right. Attached is Example1.jpg which
illustrates the hard-to-read result from this behavior.

3) Resizing the columns is reset if you run the same or similar query again.

4) You cannot double-click a column's width adjustment area to shrink the column to fit (as you could in, say Excel).
Adding this small functionality would be nice. 

The above issues became irritating since I work with a lot of double/integers, and the columns run off the screen. This
lead me to use MySQL's GUI tool, which is a shame because the Netbeans integrated solution is very good. This probably
happens with any type of SQL database, but to be specific I was interacting with a MySQL server using JDBC. The file
Example2.jpg shows the table I constructed for demonstration purposes. Please let me know if any other information is
needed to assist.

Product Version: NetBeans IDE 6.5 (Build 200811100001)
Java: 1.6.0_11; Java HotSpot(TM) 64-Bit Server VM 11.0-b16
System: Windows Vista version 6.0 running on amd64; Cp1252; en_US (nb)
Userdir: C:\Users\<DELETED>\.netbeans\6.5
Comment 1 nathanielkofalt 2009-02-11 06:06:33 UTC
Created attachment 76831 [details]
Example of integer/double problem
Comment 2 nathanielkofalt 2009-02-11 06:07:21 UTC
Created attachment 76832 [details]
The structure of the example table shown in the previous image
Comment 3 Jiri Rechtacek 2009-10-16 14:12:43 UTC
Reassigned to new owner.
Comment 4 matthias42 2012-05-24 19:51:58 UTC
*** Bug 212965 has been marked as a duplicate of this bug. ***
Comment 5 matthias42 2012-05-24 19:52:32 UTC
*** Bug 136781 has been marked as a duplicate of this bug. ***
Comment 6 matthias42 2014-01-03 06:09:15 UTC
(In reply to nathanielkofalt from comment #0)
> 1) The column widths are not shrunk to the widest data shown, so the columns
> take up a lot of extra space. This is
> inconvenient if you have a lot of double columns. Why not shrink the columns
> depending on the data shown, with some
> wiggle room? Or have a visible option to do so?

[WORKS FOR ME] The columns are spaced according to the database metadata - while this is not the best way, I'd consider scanning the current dataset and the info from the metadata to be equivalent. If you'd scale according to the current data you would need to resize on each data page, as there could be different lengths of data on each page.

> 
> 2) Integers are aligned on the left side of their column, doubles on the
> right. Attached is Example1.jpg which
> illustrates the hard-to-read result from this behavior.

[FIXED] Tested with:

create table x (column1 int, column2 double, column3 int, column4 double);
insert into x VALUES (1, 1.0, 2, 2.0);
insert into x VALUES (3, 3.0, 4, 4.0);

In netbeans 7.4 all column entries are right aligned => its readable.

> 3) Resizing the columns is reset if you run the same or similar query again.

Ack. - Though it would narrow the problem down to - resizing the columns is reset when you run the same query again. (Same could be interpreted as "resulting in the same column name order than a previous query).

> 4) You cannot double-click a column's width adjustment area to shrink the
> column to fit (as you could in, say Excel).
> Adding this small functionality would be nice. 

[FIXED] Checked in netbeans 7.4 -> works