From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id A68C228829 for ; Thu, 29 Aug 2019 16:43:10 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Kkhg2snSI9yb for ; Thu, 29 Aug 2019 16:43:10 -0400 (EDT) Received: from smtp33.i.mail.ru (smtp33.i.mail.ru [94.100.177.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 691C928824 for ; Thu, 29 Aug 2019 16:43:10 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH 6/8] refactoring: use sql_prepare() and sql_execute() in tx_process_sql() References: From: Vladislav Shpilevoy Message-ID: <2b1bc872-74a1-f6f7-1cba-6fb0076dce56@tarantool.org> Date: Thu, 29 Aug 2019 22:46:24 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org, Nikita Pettik Cc: kostja@tarantool.org, alexander.turenko@tarantool.org Thanks for the patch! I think, it is better to keep using subsystem names in commit titles. I.e. not 'refactoring:', but 'sql:'. On 27/08/2019 15:34, Nikita Pettik wrote: > In case of dry-run execution we don't need to substitute binding values > or execute statement. So now we split sql_prepare_and_execute() into > independent steps, so that we can omit some of them depending on > execution mode. Not sure if it is worth doing. I think, you can keep prepare_and_execute, pass sql_opts to it, and inside this function you fill port options, omit execution etc. Anyway you will end up with the same, but in two places - Lua and iproto. It is better to have one function for both.