original_docstring: 
          Adds a file listing to the database
          :param pair: dict containing cycledate and forecastdate
          :param datatype: The table that this file will be added to (i.e. gfsfcst)
          :param filepath: Relative file location
          :return:
          
docstring: Adds a file listing to the database
docstring_tokens: Adds a file listing to the database
code: def add(self, pair, datatype, filepath):
          """
          Adds a file listing to the database
          :param pair: dict containing cycledate and forecastdate
          :param datatype: The table that this file will be added to (i.e. gfsfcst)
          :param filepath: Relative file location
          :return:
          """
          if datatype == "hwrf":
              sql = self.__generate_sql_hwrf(filepath, pair)
          elif datatype == "nhc_fcst":
              sql = self.__generate_sql_nhc_fcst(filepath, pair)
          elif datatype == "nhc_btk":
              sql = self.__generate_sql_nhc_btk(filepath, pair)
          else:
              sql = self.__generate_sql_generic(datatype, filepath, pair)
  
          db = self.connect()
          cur = db.cursor()
          cur.execute(sql["has"])
          nrows = cur.fetchone()[0]
          if nrows == 0:
              cur.execute(sql["insert"])
          elif nrows > 0 and datatype == "nhc_btk":
              cur.execute(sql["update"])
  
          db.commit()
          db.close()
code_tokens: def add ( self , pair , datatype , filepath ) : if datatype == "hwrf" : sql = self . __generate_sql_hwrf ( filepath , pair ) elif datatype == "nhc_fcst" : sql = self . __generate_sql_nhc_fcst ( filepath , pair ) elif datatype == "nhc_btk" : sql = self . __generate_sql_nhc_btk ( filepath , pair ) else : sql = self . __generate_sql_generic ( datatype , filepath , pair ) db = self . connect ( ) cur = db . cursor ( ) cur . execute ( sql [ "has" ] ) nrows = cur . fetchone ( ) [ 0 ] if nrows == 0 : cur . execute ( sql [ "insert" ] ) elif nrows > 0 and datatype == "nhc_btk" : cur . execute ( sql [ "update" ] ) db . commit ( ) db . close ( )
short_docstring: Adds a file listing to the database
short_docstring_tokens: Adds a file listing to the database
comment: """
          Adds a file listing to the database
          :param pair: dict containing cycledate and forecastdate
          :param datatype: The table that this file will be added to (i.e. gfsfcst)
          :param filepath: Relative file location
          :return:
          """