They are listed in

SQLDB._instances[thread.id]

Look into SQLDB._close_all_instances in sql.py



On Mar 13, 6:02 am, DenesL <denes1...@yahoo.ca> wrote:
> On Mar 12, 10:49 pm, Yarko Tymciurak <yark...@gmail.com> wrote:
>
>
>
> > On Thu, Mar 12, 2009 at 9:47 PM, DenesL <denes1...@yahoo.ca> wrote:
>
> > > Actually we are currently using views in a way.
> > > When a table is migrated the old fields remain in there but we can not
> > > see them.
>
> > I do not think so... here's an example of a recent migration I made (resize
> > a column):
>
> > timestamp: 2009-03-09T12:19:48.093227
> > ALTER TABLE sample ADD name__tmp VARCHAR(64) UNIQUE;
> > UPDATE sample SET name__tmp=name;
> > ALTER TABLE sample DROP COLUMN name;
> > ALTER TABLE sample ADD name VARCHAR(64) UNIQUE;
> > UPDATE sample SET name=name__tmp;
> > ALTER TABLE sample DROP COLUMN name__tmp;
> > success!
>
> Which DB engine are you using?.
> My statement seems to hold true for sqlite, the table still has the
> old fields, I can execute select statements using them, it might be a
> bug then. I will test with the latest trunk.
>
> > > A seemingly unrelated question:
> > > is there an easy way to get all the objects of type <class
> > > 'gluon.sql.SQLDB'> ?
>
> What I need to find out is which dbs are defined, e.g. in models:
> dbX=SQLDB(...)
> dbY=SQLDB(...)
> then it would be [dbX, dbY] or even better {'dbX':dbX, 'dbY':dbY}
>
> Maybe using getattr over the locals() or globals()? but I can't figure
> it out yet...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to