Skip to content

Evaluating url function at time of DB connection #351

@fmasa

Description

@fmasa

First of all, thank you for awesome plugin. It makes my life significantly better.

I am resolving database url dynamically for multiple databases using CLI command that generates temporary credentials as follows:

vim.g.dbs = vim.tbl_map(
  function(database)
    return {
      name = database,
      url = function()
        return vim.fn.system('<command obtaining connection string>')
      end
    }
  end,
  staging_databases
)

The problem is that when I open DBUI, the url is resolved for all the databases. Since our company has 20+ databases and generating credentials takes few seconds, this takes a long time to just open UI.

Would it be possible to defer url resolution until actual connection to the database?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions