andialbrecht / crunchyfrog

Head over to RunSQLRun, the successor of CrunchyFrog
http://runsqlrun.org
GNU General Public License v3.0
5 stars 2 forks source link

Display schema prefix? #81

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
At least SQL server for example, supports multiple schemas per database,
though in practice I've rarely seen it. However, using CF against the
AdventureWorks sample database, I got caught out, as that has many schemas
(Person/Production/Sales etc); for example, select * from Vendor fails, as
it's not dbo.Vendor, it's Purchasing.Vendor

You might want to consider having an option to display the schema prefix in
the navigator (if you dont already anyway, I couldn't see one).

Seems to be working quite well against my sql boxes now though, thanks a
lot being responsive :)

Original issue reported on code.google.com by darren.w...@gmail.com on 10 Dec 2009 at 3:45

GoogleCodeExporter commented 9 years ago
Here's a small patch which will group/display the schemata correctly, and also
prepend the correct schema when you drag and drop from the navigator. Tested and
behaves correctly with MSSql, MySQL and SQLite (no access to Oracle or the 
others I'm
afraid, though I'm not sure which (other than oracle) supports multiple schemas)

Original comment by darren.w...@gmail.com on 14 Dec 2009 at 2:30

Attachments:

GoogleCodeExporter commented 9 years ago
It should be safe to apply this without worrying about the implications on the
drivers I cant test, it will use the current behaviour if the .schema property 
is not
found on the Table/View. Incidentally this also makes it trivial to apply to 
other
backends when they can be tested (you just need to add schema=schema when
instantiating the view/table)

Original comment by darren.w...@gmail.com on 14 Dec 2009 at 2:40

GoogleCodeExporter commented 9 years ago
That's an good idea. Thanks!

Original comment by albrecht.andi on 15 Dec 2009 at 8:50

GoogleCodeExporter commented 9 years ago
r8a2fce9ea3dc

Original comment by albrecht.andi on 15 Dec 2009 at 8:51