You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

16 lines
551 B

  1. class BaseDatabaseClient(object):
  2. """
  3. This class encapsulates all backend-specific methods for opening a
  4. client shell.
  5. """
  6. # This should be a string representing the name of the executable
  7. # (e.g., "psql"). Subclasses must override this.
  8. executable_name = None
  9. def __init__(self, connection):
  10. # connection is an instance of BaseDatabaseWrapper.
  11. self.connection = connection
  12. def runshell(self):
  13. raise NotImplementedError('subclasses of BaseDatabaseClient must provide a runshell() method')