예제 #1
0
def save_assets_to_db(instruments):
    make_psycopg_green()
    log.info("saving new supported instruments to database")
    build_instruments(instruments)
    log.info("all new instruments saved to DB")
예제 #2
0
def get_assetid_occlassid_ocid_tuples():
    make_psycopg_green()
    session = Session()
    asset_class_inst_tuples = session.query(OCAsset.asset_id, OCAsset.oc_class_id, OCAsset.oc_id).all()
    session.close()
    return asset_class_inst_tuples