Fixed this problem by using the standard DBServerInfo.

So it should be noted for inclusion of the GenericServerInfo to the
codebase that this functionality needs to be checked!

Kenny

On Feb 23, 4:53 pm, "Paul Rigor (gmail)" <paulri...@gmail.com> wrote:
> Hi Chris,
>
> The GenericServerInfo class adds a couple of things
> 1) a generic way of supplying the RDMBs parameters
> 2) a transparent way of obtaining a table schema
>
> GenericServerInfo actually subclasses DBServerInfo and overloads the methods
> to
> 1) create a connection
> 2) obtain table schema
>
> In order to take advantage of sqlalchemy, I also had to modify
> SQLTableBase.__init__():
> 1) to obtain a database cursor
> 2) to obtain the table schema for the primary key
> 3) to drop a table if the 'createTable' argument is provided
>
> Two other data structures (python dictionaries) were updated and added:
> 1) _formatMacrosDict -- to map the sql formatters for the supported
> mysql/sqlite backends
> 2) _DBServerModuleDict -- to map to the appropriate RDBMs class to obtain
> the schema
>
> In the current implementation of sqlgraph (at least for the DB connection
> portion), there were too many levels of indirection that GenericServerInfo
> had hope to fix and clean up!
>
> Are there other functionalities aside from obtaining a cursor and the
> primary that other portions of sqlgraph requires? My understanding what the
> other classes just use the cursor provided by DBServerInfo
> (GenericServerInfo) to wrap query results.
>
> Thanks,
> Paul
>
>
>
>
>
> On Mon, Feb 22, 2010 at 10:09 PM, Kenny Daily <kmda...@gmail.com> wrote:
> > Here's our version of sqlgraph.py, from the 0.80 beta. He added a
> > class called GenericServerInfo (line 1806).
>
> >http://kmdaily.pastebin.com/f4cf21744
>
> > All I know that it does (for me) is it takes a parameter of a DB URI
> > instead of separate host, user, password parameters. I believe he
> > added it because we couldn't use non-standard MySQL ports with
> > previous versions of pygr...but don't take my word for it. I've asked
> > him to comment on this thread to help out. Thanks!
>
> > Kenny
>
> > On Feb 22, 6:28 pm, Christopher Lee <l...@chem.ucla.edu> wrote:
> > > On Feb 22, 2010, at 1:44 PM, Kenny Daily wrote:
>
> > > > I'm looking into upgrading, but Paul added some class for added
> > > > functionality to database connections that I'll have to get him to re-
> > > > do - otherwise our connections are broken.
>
> > > If this is a problem that isn't strictly specific to your database
> > server, can you or Paul point me to his code branch containing this code
> > change?  I'd like to see what you're talking about.
>
> > > -- Chris
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "pygr-dev" group.
> > To post to this group, send email to pygr-...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > pygr-dev+unsubscr...@googlegroups.com<pygr-dev%2bunsubscr...@googlegroups.c 
> > om>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/pygr-dev?hl=en.
>
> --
> Paul Rigor
> Pre-doctoral BIT Fellow and Graduate Student
> Institute for Genomics and Bioinformatics
> Donald Bren School of Information and Computer Sciences
> University of California, Irvinehttp://www.ics.uci.edu/~prigor
>
>  sqlgraph.py
> 138KViewDownload

-- 
You received this message because you are subscribed to the Google Groups 
"pygr-dev" group.
To post to this group, send email to pygr-...@googlegroups.com.
To unsubscribe from this group, send email to 
pygr-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pygr-dev?hl=en.

Reply via email to