ws.db.grabbers.user module¶
- class ws.db.grabbers.user.GrabberUsers(api, db)¶
- Bases: - ws.db.grabbers.GrabberBase.GrabberBase- INSERT_PREDELETE_TABLES = ['user_groups']¶
 - gen_inserts_from_user(user)¶
 - gen_deletes_from_user(user)¶
 - gen_insert()¶
- A generator for database entries which assumes that the tables are empty. - To be implemented in subclasses. - The yielded values are passed to - sqlalchemy.engine.Connection.execute(), so the accepted formats for the values are:- (stmt, entry)tuple, where- stmtis an object accepted by sqlalchemy’s execute method (e.g. plain string or an executable SQL statement construct) and- entryis a dict holding the bound parameter values to be used in the execution. The execution is deferred with- ws.db.execution.DeferrableExecutionQueueto exploit the executemany execution strategy.
- Or it can yield - stmtobjects directly, if the executemany execution strategy is not applicable.
 
 - gen_update(since)¶
- A generator for database entries which assumes incremental updates. - To be implemented in subclasses. - If - ws.client.api.ShortRecentChangesErroris raised while executing this generator,- update()starts from scratch with- insert(). The exception should be raised as soon as possible to save unnecessary work.- The yielded values should follow the same rules as the - gen_insert()method.
 
