Open nlinaje opened 6 months ago
@Iron-E added initial support for some Oracle stuff.
@Iron-E , can you provide some feedback on this PR? Thanks!
I agree with @nlinaje in this one, I was having the same issue with the Schemas / Tables navigation because I have a customer with table names bigger than 25 characters.
Thanks!
@Iron-E added initial support for some Oracle stuff.
@Iron-E , can you provide some feedback on this PR? Thanks!
Sorry for the long time without a response!
I seem to recall the decision for a20
was purely viaual, and if that isn't working for users today then I agree it should be changed (especially if the max name length has increased so much 😅).
Perhaps an option would work here? I don't recall the vim-dadbod-ui architecture off the top of my head, but it could be beneficial (if possible) to allow for max lengths across adapters (e.g. g:db_ui_trim = {'columns': 35}
, and just default to no max length.
After the plugin connects to the oracle database and puts all tables in the tree, some of the tables get truncated.
The plugin truncates it at 20 characters, but the maximum number of characters in Oracle is 30. (Versions <=12.2)
I changed the line:
\ 'COLUMN table_name FORMAT a25',
to\ 'COLUMN table_name FORMAT a30',
to be able to see the full table names in my database in the tree window (as I am using version 12.2)Link to oracle documentation: https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/Database-Object-Names-and-Qualifiers.html#GUID-75337742-67FD-4EC0-985F-741C93D918DA
Setting the format to big values have drawbacks. For example, setting the columns to 128 in the helpers, makes the preview window in some cases (i.e. "references") unusable, as each column has 128 chars for data being between 10 and 20 chars.
From my point of view, the table_name and owner in schemas.vim should be changed to 30 chars (or 128 for versions >12.2) so that the tree can be created correctly. The column_name could be set to 30 chars too. In the helpers I would leave it with 20 or maximum set it to 30.