code: def Where_filter_gen(*data):
      
      where = []
  
      def Fwhere(field, pattern):
          """Add where filter for the given field with the given pattern."""
          where.append("WHERE {0} LIKE '{1}'".format(field, pattern))
  
      def Fstring(field, string):
          """Add a where filter based on a string."""
          Fwhere(field, "%{0}%".format(string if not isinstance(string, str)
                                       else str(string)))
  
      def Fdict(field, data):
          """Add where filters to search for dict keys and values."""
          for key, value in data.items():
              if value == '*':
                  Fstring(field, key)
              else:
                  Fstring(field, "{0}:%{1}".format(key, value if not
                                                   isinstance(value, str)
                                                   else str(value)))
  
      def Flist(field, data):
          """Add where filters to search for elements of a list."""
          for elem in data:
              Fstring(field, elem if not isinstance(elem, str) else
                      str(elem))
  
      for field, data in data:
          if isinstance(data, str):
              Fstring(field, data)
          elif isinstance(data, dict):
              Fdict(field, data)
          elif isinstance(data, list):
              Flist(field, data)
  
      return ' AND '.join(where)
docs: Generate an sqlite "LIKE" filter generator based on the given data.
      This functions arguments should be a N length series of field and data
      tuples.