dolthub / dolt

Dolt – Git for Data
Apache License 2.0
17.36k stars 488 forks source link

Discover dolt databases on a computer #7163

Open danielsiegl opened 6 months ago

danielsiegl commented 6 months ago

For my scenarios it would be helpful if dolt knew which databases are on a computer!

something like dolt discover listing all available databases (or recently used)

danielsiegl commented 6 months ago

I want this because I want to make the process of opening a dolt database easy from a COTS Applicaiton (Sparx Systems Enterprise Architect).

I need to locate the database and run the dolt sqlserver interface for a specific database.

An alternative would be if the SQL Interface can be started and only then via connection string (e.g. full path) attached to a dolt database.

timsehn commented 6 months ago

Interesting idea. I'm not sure how we would implement it but let us discuss internally.

There's two things possible:

  1. Detecting running servers. Look at open ports and probe whether they are dolt ports (not sure if we can do this)
  2. Take a path and look for .dolt directories.
danielsiegl commented 6 months ago

@timsehn probably you would have to keep a list of all previously used databases on a machine somewhere

timsehn commented 6 months ago

That's another option, we could stick the list in the users ~/.dolt configuration.