qstudio icon indicating copy to clipboard operation
qstudio copied to clipboard

Don't let people connect to `{file}`

Open richb-hanover opened this issue 1 year ago • 6 comments

OK. I figured out how I got into such a bad state (#47). Here's my thought process that led me to the bad state.

  • Server -> Add Server... "Hmmm... It's not really a server. But I think I know what qstudio means."
  • Sever Ty... "Hmmm... I don't know what a 'KDB' is, but look! There's SQLite. I'll choose that."
  • Connect By: "I dunno...
    • "It's not a host on the network: it's just a SQLite file. So I won't click Host"
    • "I guess it must be a URL. But that seems like it would have to be on the network as well. Well, the default is usually safe.
    • jdbc:sqlite:{file} "I don't know what that means, either. I'll leave it alone"
  • Name: "I guess I need to type the name of the file to open"
  • "I'll just leave all the rest empty/as-is"
  • Blammo! qstudio creates the blank {file} file, and life stinks.

To refresh my memory of how this looks on my Mac, I posted a video. It's at: https://youtu.be/sw9nZXIRzZo

Suggestions:

  • SQLite databases are odd: they wrap everything into a single file. If I select "SQLite", maybe qstudio could display a file picker for the "Connect By" section?
  • If someone leaves the choice as jdbc:sqlite:{file}, it would be good to give an error, saying to enter a file name not "{file}"

richb-hanover avatar Jun 03 '24 00:06 richb-hanover