On Fri, Mar 13, 2009 at 5:06 PM, DenesL <denes1...@yahoo.ca> wrote:

>
> 1) "Views" in sqlite:
>
>   sqlite does not have ALTER TABLE ... DROP COLUMN so that explains
> the "extra" fields.


Ah, yes - now I see: http://www.sqlite.org/lang_altertable.html

>
> 2) Thanks for the ipython suggestion and the SQLDB._instances
> explanation.
>   What I find obscure is the use of SQLBD._instances by itself.
>   SQLDB is a class and yes, it has an attribute named _instances, so
> far so good.


Ok - let's call it by what it is:  SQLDB._open_by_thread just to make
reading this easier...


>   Defined databases are instances of SQLDB and I would understand the
> use of dbA._open_by_thread but SQLDB._open_by_thread?.


again, language helps here: rewriting your statement shows how much sense
this makes in each case.

Think this way:   db_connection ==> open_by ==> [pid, ...]
and   SQLDB_sessions ==> open_by ==> [pid, ...], each with ==> db_instances
connected to (an instance in a session)

Make more sense?


3) In the meantime to find the defined databases I came up with
> something like this:
>
> DBs={}
> DBtype=type(SQLDB())
> for n in globals():
>  if type(globals()[n])==DBtype:
>    DBs[n]=globals()[n]
>
> I think I needed something like this a while back...


Ok... but you get the same for currently open session, and you get that from
any process... which can see what other sessions are open...

So, not sure what you're getting out of this that you don't from the
former...

Regards,
Yarko

--~--~---------~--~----~------------~-------~--~----~
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