in our system we have 2 Ssession objects:

• reader database
• writer database

i'm wondering if it's possible to query the Session object for the 
following:

• has the Session established a connection to the database already ?
  ie, has it undergone any activity, such as actually connecting and/or 
emitting a `begin` statement
  from my understanding, accessing a `.connection` object might connect to 
the database

• has the Session loaded a specific item yet (via `get` or stored in the 
internal stash)?
  everything i've read in the API would actually try to load the item from 
the database.

for the sake of transparency, i'm looking to optimize some database 
interactions.  there are a few places where i may be able to save a db call 
by seeing if we connected on the other handle and loaded that data already.



-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to