Tarantool development patches archive
 help / color / mirror / Atom feed
From: "n.pettik" <korablev@tarantool.org>
To: tarantool-patches@freelists.org
Cc: Imeev Mergen <imeevma@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH v3 5/6] sql: 'PRAGMA' result in the appropriate format
Date: Wed, 16 Jan 2019 18:35:25 +0300	[thread overview]
Message-ID: <31FE8701-BB3C-4D38-879C-5A313789F3DF@tarantool.org> (raw)
In-Reply-To: <1b0d86990ecf8c9b310cdfdc58ec9006c77c038a.1545844480.git.imeevma@gmail.com>


>> There is no ’Tarantool format’...
> Changed to "more appropriate”.

Cmon, it is called YAML...

> 
>> Why do you consider it as wrong? AFAIR I made it exclusively to
>> extend debug facilities.
>> 
>> Things like
>>  - ['index_info', null]
>>  - ['index_list', null]
>> 
>> look quite strange IMO. What is more, it may be misleading:
>> index_list with null arg looks like there is no indexes at all.
> Changed rows with values == NULL. Now instean of NULL they shows
> "No value”.

Now it is even worse.
I vote for displaying only flag pragmas and make
second field of resulting filed to be of type bool. 
You can ask other members for their opinion.

>> Btw I don’t understand all these efforts to make pragma
>> better. As I already said we are going to remove it anyway.
> I thought it would be correct, since it can be used by the user.

It can be used by users until we remove it. That’s it.

> commit 1b0d86990ecf8c9b310cdfdc58ec9006c77c038a
> Author: Mergen Imeev <imeevma@gmail.com>
> Date:   Thu Dec 13 21:07:31 2018 +0300
> 
>    sql: 'PRAGMA' result in the appropriate format
> 
>    Currently, box.sql.execute('PRAGMA') returns nothing but it prints
>    some information on stdout.

Nit: be specific: not ’some information’ but list of pragmas
and their statuses.

Nit: print to stdout.

> This looks wrong.

"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 in more appropriate format.

"In yaml format as the rest of SQL commands.”

Sorry for being too meticulous.

> 
> diff --git a/test/sql/sql-debug.result b/test/sql/sql-debug.result
> index 692fa82..9c5c9b3 100644
> --- a/test/sql/sql-debug.result
> +++ b/test/sql/sql-debug.result

Why did you move test to this file?
PRAGMA itself is not debug-only command.

  reply	other threads:[~2019-01-16 15:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-26 18:17 [tarantool-patches] [PATCH v3 0/6] sql: set column types for EXPLAIN and PRAGMA imeevma
2018-12-26 18:17 ` [tarantool-patches] [PATCH v3 1/6] sql: remove unused macros from pragma.c and pragma.h imeevma
2019-01-16 15:34   ` [tarantool-patches] " n.pettik
2018-12-26 18:18 ` [tarantool-patches] [PATCH v3 2/6] sql: fix "PRAGMA parser_trace" result imeevma
2019-01-16 15:35   ` [tarantool-patches] " n.pettik
2018-12-26 18:18 ` [tarantool-patches] [PATCH v3 3/6] sql: Show currently set sql_default_engine imeevma
2018-12-26 18:18 ` [tarantool-patches] [PATCH v3 4/6] sql: fix "PRAGMA case_sensitive_like" result imeevma
2019-01-16 15:35   ` [tarantool-patches] " n.pettik
2018-12-26 18:18 ` [tarantool-patches] [PATCH v3 5/6] sql: 'PRAGMA' result in the appropriate format imeevma
2019-01-16 15:35   ` n.pettik [this message]
2018-12-26 18:18 ` [tarantool-patches] [PATCH v3 6/6] sql: set column types for EXPLAIN and PRAGMA imeevma
2019-01-16 15:35   ` [tarantool-patches] " n.pettik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=31FE8701-BB3C-4D38-879C-5A313789F3DF@tarantool.org \
    --to=korablev@tarantool.org \
    --cc=imeevma@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH v3 5/6] sql: '\''PRAGMA'\'' result in the appropriate format' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox