Exemplo n.º 1
0
def fetchone(q, subs=None, default=None):
    pool = PostgresConnectionPool(debug=settings.debug, **settings.db)
    res = pool.fetchone(q, subs)
    return res
Exemplo n.º 2
0
def batch(q, subs=None):
    pool = PostgresConnectionPool(debug=settings.debug, **settings.db)
    res = pool.executemany(q, subs)
    return res
Exemplo n.º 3
0
def perform(q, subs=None):
    """
    Executes the query, returns nothing
    """
    pool = PostgresConnectionPool(debug=settings.debug, **settings.db)
    pool.execute(q, subs)
Exemplo n.º 4
0
def fetchone(q, subs=None, default=None):
    pool = PostgresConnectionPool(debug=settings.debug, **settings.db)
    res = pool.fetchone(q, subs)
    return res
Exemplo n.º 5
0
def batch(q, subs=None):
    pool = PostgresConnectionPool(debug=settings.debug, **settings.db)
    res = pool.executemany(q, subs)
    return res
Exemplo n.º 6
0
def perform(q, subs=None):
    """
    Executes the query, returns nothing
    """
    pool = PostgresConnectionPool(debug=settings.debug, **settings.db)
    pool.execute(q, subs)