vim-dadbod-ui
vim-dadbod-ui copied to clipboard
Not drawing schema and tables on MSSQL Server (SQL Server) connections
Can't see the schemas and table information when connecting on SQLServer databases.
I only get the errors attached on the image:
Although I can execute queries without problems.
Same with postgrr server somehow. no errors but no shemas, tables :(
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Needs further investigation
I finally solved it by changing some keywords to upper case:
let s:sqlserver = {
\ 'args': ['-h-1', '-W', '-s', '|', '-Q'],
\ 'foreign_key_query': trim(s:sqlserver_foreign_keys_query),
\ 'schemes_query': 'SELECT schema_name FROM INFORMATION_SCHEMA.SCHEMATA',
\ 'schemes_tables_query': 'SELECT table_schema, table_name FROM INFORMATION_SCHEMA.TABLES',
\ 'select_foreign_key_query': 'select * from %s.%s where %s = %s',
\ 'cell_line_number': 2,
\ 'cell_line_pattern': '^-\+.-\+',
\ 'parse_results': {results, min_len -> s:results_parser(results[0:-3], '|', min_len)},
\ 'quote': 0,
\ 'default_scheme': 'dbo',
\ }
I pushed this change now, thanks!