What is the best way to save all my reflected metadata? Currently it is
taking >1 min just to start my program and I'd like to cut that down. I
suppose there is a way to use pickle to save the metadata and reload
it, but I'm not sure where to start. Here is a sample of my program
where I'd like to use pickle:

from sqlalchemy import *
import pickle

db = create_engine('oracle://myusername:[EMAIL PROTECTED]')

metadata = BoundMetaData(db)

pvv_table = Table('protocol_variant_value',metadata,autoload=True)
vtd_table = Table('variant_type_dictionary',metadata,autoload=True)
pvt_table = metadata.tables['protocol_variant_type']

class Vtd(object):
    def __repr__(self):
        return self.variant_type_name

class Pvt(object):
    def __repr__(self):
        return repr(self.variant_name)

class Pvv(object):
    def __repr__(self):
        return self.variant_value

mapper(Pvv, pvv_table)
mapper(Vtd, vtd_table)
mapper(Pvt, pvt_table, properties={
    'variant_values':
relation(Pvv),'variant_name':relation(Vtd)},order_by =
pvt_table.c.vt_id)

session = create_session()

## start doing stuff here


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to