[tarantool-patches] Re: [PATCH v5 5/6] sql: get results of PRAGMA statement in YAML format

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Wed Jan 30 16:56:53 MSK 2019

On 29/01/2019 17:29, imeevma at 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(-)

More information about the Tarantool-patches mailing list