statsbiblioteket.harvest.synch package

Submodules

statsbiblioteket.harvest.synch.harvest_synch module

statsbiblioteket.harvest.synch.harvest_synch.backup(args, harvest_user, harvest_pass)[source]
statsbiblioteket.harvest.synch.harvest_synch.create_parser()[source]
statsbiblioteket.harvest.synch.harvest_synch.main()[source]
statsbiblioteket.harvest.synch.harvest_synch.printDDL(engine)[source]
statsbiblioteket.harvest.synch.harvest_synch.recreate(session: sqlalchemy.orm.session.Session, cls: statsbiblioteket.harvest.harvest_types.HarvestType, objects: typing.Set, project_id=None, *criterion) → typing.Set[source]

Upserts the given objects in the database and removes any objects not given. To elaborate, all objects of the same type, matching the project_id, if given and any other criterion will be deleted, if they are not present in :param session: The database session :param cls: The class of the objects (which implicitly denote the sql table) :param objects: The objects to create :param project_id: The project id :param criterion: Other criterion for the delete :return: The updated objects

Module contents