On Sunday 18 March 2007 17:29, Ed Leafe wrote: > On Mar 18, 2007, at 8:19 PM, Carl Karsten wrote: > > Host/user/password is easy - 3 textboxes, pass the values through > > the BO to the > > CO. that gets me the connection and cursor object I need. > > > > for each DB the user has rights to - that seems pretty DB stuff, so > > I guess add > > a method to a custom cursor class that returns a list of dbs. > > Not exactly. If you're going to be digging into the structure of > databases, you have to get a little "close to the silicon" than the > standard backend-agnostic cursor class. In your afterInit() of the > bizobj, re-define its self.dbapiCursorClass to be a custom subclass > of the default class that has the methods you need to query the > backend for database permissions and such. > > > but returns the list to what? this is where I get lost. which > > normaly means I > > need some BO code. my guess is I need a for loop in some BO > > method. maybe the > > same BO methon that I passed the host/u/pw to? I could cram > > 'everything' into > > that method but that doesn't sound very elegant. > > I'm not sure exactly what you're trying to accomplish, but it sounds > like you want to have code to determine the data the user can access, > and then execute queries within that database. IOW, more of a > database manager than a data manager. Is that close? > > -- Ed Leafe > -- http://leafe.com > -- http://dabodev.com Just need a clarification. Some where I recall that getTables was limited to retriving only tables that the user had access. That is how I programmed dbPostgres. Does dbMySQL work differently. -- John Fabiani
_______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
