示例#1
0
    def insert(self, new_record):
        """

        :param new_record: A dictionary representing a row to add to the set of records.
        :return: None
        """
        cox = pymysql.connect(**self.connect_info)
        sql, args = SQLHelper.create_insert(self.table_name, new_record)
        num, res = SQLHelper.run_q(sql, args, cox)
        return None
示例#2
0
    def insert(self, new_record):
        """

        :param new_record: A dictionary representing a row to add to the set of records.
        :return: None
        """
        sql, args = SQLHelper.create_insert(self._table_name, new_record)

        res, data = SQLHelper.run_q(sql, args, conn=self._connect)

        return res, data
    def insert(self, new_record):
        """

        :param new_record: A dictionary representing a row to add to the set of records.
        :return: None
        """
        sql, args = SQLHelper.create_insert(table_name=self.table_name,
                                            row=new_record)
        res, data = SQLHelper.run_q(sql=sql,
                                    args=args,
                                    conn=self.connect_info,
                                    commit=self.commit)
        return None