code: def subdomain_row_factory(cls, cursor, row):
          
          d = {}
          for idx, col in enumerate(cursor.description):
              d[col[0]] = row[idx]
  
          return d
docs: Dict row factory for subdomains