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 6603C1F917 for ; Wed, 30 Jan 2019 08:56:56 -0500 (EST) 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 Fscv6LqU_aVd for ; Wed, 30 Jan 2019 08:56:56 -0500 (EST) Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (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 F39CF2664D for ; Wed, 30 Jan 2019 08:56:55 -0500 (EST) Subject: [tarantool-patches] Re: [PATCH v5 5/6] sql: get results of PRAGMA statement in YAML format References: <1a7fd53719a4790845c68f815a4f1a9f4f84b97a.1548771900.git.imeevma@gmail.com> From: Vladislav Shpilevoy Message-ID: <64adcf21-d8dc-6069-8382-79fc1a467e15@tarantool.org> Date: Wed, 30 Jan 2019 16:56:53 +0300 MIME-Version: 1.0 In-Reply-To: <1a7fd53719a4790845c68f815a4f1a9f4f84b97a.1548771900.git.imeevma@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed 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, imeevma@tarantool.org Cc: korablev@tarantool.org On 29/01/2019 17:29, imeevma@tarantool.org wrote: > Currently box.sql.execute ('PRAGMA') returns nothing, but prints > list of pragmas and their statuses to stdout. Such strategy is > considered to be wrong since output of this command would be > unavailable for users who redirect stdout, use net box connection > etc. This patch makes the command to return result as the rest of > SQL commands. The result contains only FLAG-type pragmas and their > statuses in YAML format. You do not return them in YAML format. You return them as a result set. Using C or python connector, I can call PRAGMA, and I will not get yaml, but a result set. In YAML you only print them, using console. No console - no yaml. > --- > src/box/sql/pragma.c | 58 +++++++++++++++------------------------------ > test/sql/sql-debug.result | 24 +++++++++++++++++++ > test/sql/sql-debug.test.lua | 5 ++++ > 3 files changed, 48 insertions(+), 39 deletions(-) >