From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,NO_DNS_FOR_FROM, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from [192.168.1.2] (unknown [101.128.125.157]) by gnuweeb.org (Postfix) with ESMTPSA id C242A7E257; Sat, 30 Jul 2022 01:28:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1659144496; bh=J7O/itKcObOCMoWt44ix/CQ0x+5/aLYUf2mu5iWhXUE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=C0DohbTgcKMLQtcOrmEZdZ28Yg4jklGRSlOBhprwM/BpjxQEwVTNJPzfR6LV6nld/ JTYjyG+g+0ZvLzqWaDIPdjbIiHdvWd4ymgPnF4CY73IcuMpR5addVR8glPVv5T4qHQ 0etxd6BqKTQM1EBldq8mmCv0qIpa14jFCZ9OeOkQ5ZpK2vIo3cktep6UV5gJsa2zWE MIDNxSGgUWpqJCvJVgdcJrPHwl3dJ1FfWsp/im6Bu2PUpdC7TjbklxnLVV8WhjoGoQ FzHYsRxgIK3nuGkcCE82+k348f626UUSy6ilL1riGUvXfn1T33+fT7cG1uwLxufGWT 9nuRLcb1omItg== Message-ID: <2224b194-2b7f-2525-5db4-fb1e9b4dce75@gnuweeb.org> Date: Sat, 30 Jul 2022 08:28:12 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.1.0 Subject: Re: [PATCH v3 14/18] Add delete_broadcast() in scraper/db.py Content-Language: en-US To: Ammar Faizi Cc: GNU/Weeb Mailing List , Alviro Iskandar Setiawan References: <20220729014052.1547-1-kiizuha@gnuweeb.org> <20220729014052.1547-15-kiizuha@gnuweeb.org> From: Muhammad Rizki In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: On 30/07/2022 08.23, Ammar Faizi wrote: > On 7/29/22 8:40 AM, Muhammad Rizki wrote: >> +    def delete_broadcast(self, chat_id: int): >> +        q = """ >> +            DELETE FROM broadcast_chats >> +            WHERE chat_id = %(chat_id)s >> +        """ >> +        self.cur.execute(q, {"chat_id": chat_id}) >> +        return self.cur.rowcount > 0 > > OK, this one looks better. Did you manage to test this? > Yes, I did, and it works the same, thanks.