From: Nando D. <na...@de...> - 2011-05-17 06:56:31
|
Michael, >> I would find it very useful if I could reconnect the SQL window >> (without deleting the current text) to a different database. Maybe >> through a combo-box in the toolbar. I haven't looked at the code >> yet. Would you folks find it useful > > since I don't have a real use for it it looks a little contrived to > me. It is very different from the current frame handling, all frames > have a fixed connection to a database or server, and auto-close if > those are disconnected / removed. I happen to work on sets of structurally almost identical databases, and often I need to extract DDL of some object to apply it to a different database. Currently it's copy&paste, which isn't very bad but can be made better. > Opening a new SQL editor frame for the other database and loading > the previous statement would also work for your use case if all > databases share the statement history, wouldn't it? I don't want to share the history, that would be a mess. >> and how hard would it be? > > It would be doable but not easy, since the grid, grid table and blob > editor share the raw pointer to the database (passed to them at > creation time). Some serious refactoring would be necessary. Wouldn't a shered pointer be better here, anyway? -- Nando Dessena |