

class BaseStorage(object):
    """docstring for BaseStorage"""
    def __init__(self):
        super(BaseStorage, self).__init__()

    def filter(self, criteria):
        raise Exception("Not implemneted Error")

    def getSummary(self, criteria):
        raise Exception("Not implemneted Error")

    def insert(self, measurement):
        raise Exception("Not implemented Error")

    def delete(self, measurementId):
        raise Exception("Not imlemented Error")



class BaseStorage(object):
    """docstring for BaseStorage"""
    def __init__(self):
        super(BaseStorage, self).__init__()

    def filter(self, criteria):
        raise Exception("Not implemneted Error")

    def getSummary(self, criteria):
        raise Exception("Not implemneted Error")

    def insert(self, measurement):
        raise Exception("Not implemented Error")

    def delete(self, measurementId):
        raise Exception("Not imlemented Error")

    def truncate(self):
        raise Exception("Not imlemented Error")

Add tuncate method to BaseStorage class
Add tuncate method to BaseStorage class

This will provide an interface for supporting any new database, there by, making the code more robust.

  
  
  class BaseStorage(object):
      """docstring for BaseStorage"""
      def __init__(self):
          super(BaseStorage, self).__init__()
  
      def filter(self, criteria):
          raise Exception("Not implemneted Error")
  
      def getSummary(self, criteria):
          raise Exception("Not implemneted Error")
  
      def insert(self, measurement):
          raise Exception("Not implemented Error")
  
      def delete(self, measurementId):
          raise Exception("Not imlemented Error")
  
+     def truncate(self):
+         raise Exception("Not imlemented Error")
+ 
Add tuncate method to BaseStorage class
## Code Before:


class BaseStorage(object):
    """docstring for BaseStorage"""
    def __init__(self):
        super(BaseStorage, self).__init__()

    def filter(self, criteria):
        raise Exception("Not implemneted Error")

    def getSummary(self, criteria):
        raise Exception("Not implemneted Error")

    def insert(self, measurement):
        raise Exception("Not implemented Error")

    def delete(self, measurementId):
        raise Exception("Not imlemented Error")

## Instruction:
Add tuncate method to BaseStorage class
## Code After:


class BaseStorage(object):
    """docstring for BaseStorage"""
    def __init__(self):
        super(BaseStorage, self).__init__()

    def filter(self, criteria):
        raise Exception("Not implemneted Error")

    def getSummary(self, criteria):
        raise Exception("Not implemneted Error")

    def insert(self, measurement):
        raise Exception("Not implemented Error")

    def delete(self, measurementId):
        raise Exception("Not imlemented Error")

    def truncate(self):
        raise Exception("Not imlemented Error")
