serve.py
def query_db(query, args=(), one=False):
    """Queries the database and returns a list of dictionaries."""
    cur = g.db.execute(query, args)
    rv = cur.fetchall()
    return (rv[0] if rv else None) if one else rv
Queries the database and returns a list of dictionaries.
Queries the database and returns a list of dictionaries.
Queries the database and returns a list of dictionaries .
def query_db(query, args=(), one=False):
    cur = g.db.execute(query, args)
    rv = cur.fetchall()
    return (rv[0] if rv else None) if one else rv
def query_db ( query , args = ( ) , one = False ) : cur = g . db . execute ( query , args ) rv = cur . fetchall ( ) return ( rv [ 0 ] if rv else None ) if one else rv
Queries the database and returns a list of dictionaries.
Queries the database and returns a list of dictionaries .
"""Queries the database and returns a list of dictionaries."""
query
args
one