# DatabaseOperation¶

class sunpy.database.commands.DatabaseOperation[source] [edit on github]

Bases: object

This is the abstract main class for all database operations. To implement a new operation, inherit from this class and override the methods __call__ and undo. Both these methods get no parameters (except for self of course). The undo method is expected to do the exact opposite of the __call__ method, so that calling __call__ and undo multiple times in a row must not have any side-effects. This is not checked in any way, though.

Methods Summary

 __call__() Call self as a function. undo()

Methods Documentation

__call__()[source] [edit on github]

Call self as a function.

undo()[source] [edit on github]