neuroscout/utils/db.py
def dump_pe(pes):
    """ Serialize PredictorEvents, with *SPEED*, using core SQL.
    Warning: relies on attributes being in correct order. """
    statement = str(pes.statement.compile(dialect=postgresql.dialect()))
    params = pes.statement.compile(dialect=postgresql.dialect()).params
    res = db.session.connection().execute(statement, params)
    return [
        dict(
            zip(('id', 'onset', 'duration', 'value', 'object_id', 'run_id',
                 'predictor_id', 'stimulus_id'), r))
        for r in res
        ]
 Serialize PredictorEvents, with *SPEED*, using core SQL.
    Warning: relies on attributes being in correct order. 
Serialize PredictorEvents, with *SPEED*, using core SQL.
Warning: relies on attributes being in correct order.
Serialize PredictorEvents with * SPEED * using core SQL . Warning : relies on attributes being in correct order .
def dump_pe(pes):
    statement = str(pes.statement.compile(dialect=postgresql.dialect()))
    params = pes.statement.compile(dialect=postgresql.dialect()).params
    res = db.session.connection().execute(statement, params)
    return [
        dict(
            zip(('id', 'onset', 'duration', 'value', 'object_id', 'run_id',
                 'predictor_id', 'stimulus_id'), r))
        for r in res
        ]
def dump_pe ( pes ) : statement = str ( pes . statement . compile ( dialect = postgresql . dialect ( ) ) ) params = pes . statement . compile ( dialect = postgresql . dialect ( ) ) . params res = db . session . connection ( ) . execute ( statement , params ) return [ dict ( zip ( ( 'id' , 'onset' , 'duration' , 'value' , 'object_id' , 'run_id' , 'predictor_id' , 'stimulus_id' ) , r ) ) for r in res ]
Serialize PredictorEvents, with *SPEED*, using core SQL.
Serialize PredictorEvents with * SPEED * using core SQL .
""" Serialize PredictorEvents, with *SPEED*, using core SQL.
    Warning: relies on attributes being in correct order. """
pes