Create a fresh update record from the current model state in the database.

        For read-write connected models, this will lead to the attempted update of the values of
        a corresponding object in Salesforce.

        Args:
            table_name (str): The name of the table backing the connected model (without schema)
            record_id (int): The primary id of the connected model
            update_fields (Iterable[str]): If given, the names of fields that will be included in
                the write record

        Returns:
            A list of the created TriggerLog entries (usually one).

        Raises:
            LookupError: if ``table_name`` does not belong to a connected model

def capture_update_from_model(cls, table_name, record_id, *, update_fields=()):
        """
        Create a fresh update record from the current model state in the database.

        For read-write connected models, this will lead to the attempted update of the values of
        a corresponding object in Salesforce.

        Args:
            table_name (str): The name of the table backing the connected model (without schema)
            record_id (int): The primary id of the connected model
            update_fields (Iterable[str]): If given, the names of fields that will be included in
                the write record

        Returns:
            A list of the created TriggerLog entries (usually one).

        Raises:
            LookupError: if ``table_name`` does not belong to a connected model

        """
        include_cols = ()
        if update_fields:
            model_cls = get_connected_model_for_table_name(table_name)
            include_cols = cls._fieldnames_to_colnames(model_cls, update_fields)
        raw_query = sql.SQL("""
            SELECT {schema}.hc_capture_update_from_row(
              hstore({schema}.{table_name}.*),
              %(table_name)s,
              ARRAY[{include_cols}]::text[]  -- cast to type expected by stored procedure
            ) AS id
            FROM {schema}.{table_name}
            WHERE id = %(record_id)s
        """).format(
            schema=sql.Identifier(settings.HEROKU_CONNECT_SCHEMA),
            table_name=sql.Identifier(table_name),
            include_cols=sql.SQL(', ').join(sql.Identifier(col) for col in include_cols),
        )
        params = {'record_id': record_id, 'table_name': table_name}
        result_qs = TriggerLog.objects.raw(raw_query, params)
        return list(result_qs)