code: def save_object_to_db(self,
                            obj: Any,
                            table: str,
                            fieldlist: Sequence[str],
                            is_new_record: bool) -> None:
          
          if is_new_record:
              pkvalue = getattr(obj, fieldlist[0])
              if pkvalue is None:
                  self.insert_object_into_db_pk_unknown(obj, table, fieldlist)
              else:
                  self.insert_object_into_db_pk_known(obj, table, fieldlist)
          else:
              self.update_object_in_db(obj, table, fieldlist)
docs: Saves a object to the database, inserting or updating as
          necessary.