'Database.batch.execute() stores given the SQL query in RAM memory, across threads.
Database.batch.commit() commits all buffered queries.
This can be combined with @app.task() to periodically write batches to the database
(instead of writing on each request).'

def __init__(self, name, **kwargs):

    Database.__init__(self, name, **dict(kwargs, connect=False))
    self._queue = []
