Пример #1
0
def get_strategy():
    id = request.args.get('id')
    res = psql.query('select * from data_vis.strategy where strategy_id=' + id)
    return json.dumps(res,
                      indent=2,
                      ensure_ascii=False,
                      cls=psql.JsonCustomEncoder).replace("\\", "")
Пример #2
0
def get_frame_info():
    id = request.args.get('id')
    res = psql.query('select * from data_info.frame where dataframe_id=' + id)
    return json.dumps(res,
                      indent=2,
                      ensure_ascii=False,
                      cls=psql.JsonCustomEncoder).replace("\\", "")
Пример #3
0
def get_unit():
    id = request.args.get('id')
    res = psql.query('select * from data_vis.unit where unit_id=' + id)
    # strategy_id = unit_res['records'][0][1]
    # frame_id = unit_res['records'][0][2]
    # strategy_res = psql.query('select * from data_vis.strategy where strategy_id=' + str(strategy_id))
    # frame_res = psql.query('select * from dataframes.frame_' + str(frame_id))
    return json.dumps(res,
                      indent=2,
                      ensure_ascii=False,
                      cls=psql.JsonCustomEncoder).replace("\\", "")
Пример #4
0
def get_collection():
    id = request.form.get('id')
    col_res = psql.query('select * from data_info.collection')