tpope / vim-dadbod

dadbod.vim: Modern database interface for Vim
https://www.vim.org/scripts/script.php?script_id=5665
3.64k stars 129 forks source link

Remove header and footer from SQL PLUS #172

Closed nlinaje closed 4 months ago

nlinaje commented 4 months ago

This issue refers to issue #227 of vim-dadbod-ui plugin. Depending on the SQLPlus version, we get different amount of lines for header/footer. This makes it difficult to remove them, as it depends on the SQL Plus version.

The oracle adapter in vim-dadbod plugin calls the tool as sqlplus -L. The solution is to remove the header and footer with sqlplus -L -S. In this case, the output data is equal for all tested versions.

In the code, instead of: return [get(g:, 'dbext_default_ORA_bin', 'sqlplus'), '-L', change to: return [get(g:, 'dbext_default_ORA_bin', 'sqlplus'), '-L', '-S',

Thx a log for this amazing plugin!

Note: This is my first time opening an issue. Should I do a pull request? I don't know yet how it works :(

nlinaje commented 4 months ago

A solution has been found inside vim-dadbod-ui. No changes in this project needed.