Sometimes, you need to display particular columns using a certain column function. Examples:
AQT provides a generic mechanism for dealing with columns such as this. This is done by coding a displaycol specification in the cfg file. Example:
displaycol;timestamp;to_char(:);
displaycol;geometry;:.ToString();
Note: where : appears, the column name will be substituted.
By default, when AQT displays a table, it builds a Default Query. In most cases this is:
select * from table
When a displaycol setting is used, the Default Query will be:
select col1, col2, to_char(timestamp_col) as timestamp_col from table
This will display the data using the function specified in the displaycol specifications (to_char in this example).
This default query will be used when you display a table, or go to the Run SQL or Query Builder windows. If you specify select * from table, the displaycol specification will not be used.
This is a flexible option that can be used for a number of purposes.
To prevent the display of BLOB columns, code:
displaycol;blob;'BLOB data, not displayed';
To display only the first 1000 bytes of a CLOB column, code:
displaycol;clob;left(:,1000);