Tarantool development patches archive
 help / color / mirror / Atom feed
From: Oleg Babin <olegrok@tarantool.org>
To: Aleksandr Lyapunov <alyapunov@tarantool.org>,
	tarantool-patches@dev.tarantool.org
Cc: alexander.turenko@tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] Formatted select in lua console
Date: Fri, 10 Jul 2020 18:37:25 +0300	[thread overview]
Message-ID: <37453fed-c16b-5644-b9ff-31373c64ca18@tarantool.org> (raw)
In-Reply-To: <1594375434-743-1-git-send-email-alyapunov@tarantool.org>

Hi! Thanks for your patch!

It's not a review, but I just tried to use it. Works fine for default 
yaml console. But seems it completely broken for lua output.


```

tarantool> box.space.test:fselect()
---
- - ​+-----+-----+-----+-----+-----+
   - ​|col1 |col2 |col3 |col4 |col5 |
   - ​+-----+-----+-----+-----+-----+
   - ​|  1  |     |     |     |     |
   - ​|  2  |  3  |     |     |     |
   - ​|  4  |  5  |null |null | 123 |
   - ​+-----+-----+-----+-----+-----+
...

tarantool> \set output lua
true;
tarantool> box.space.test:fselect()
{"\xe2\x80\x8b+-----+-----+-----+-----+-----+", 
"\xe2\x80\x8b|col1\xc2\xa0|col2\xc2\xa0|col3\xc2\xa0|col4\xc2\xa0|col5\xc2\xa0|", 
"\xe2\x80\x8b+-----+-----+-----+-----+-----+", 
"\xe2\x80\x8b|\xc2\xa0\xc2\xa01\xc2\xa0\xc2\xa0|\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0|\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0|\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0|\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0|", 
"\xe2\x80\x8b|\xc2\xa0\xc2\xa02\xc2\xa0\xc2\xa0|\xc2\xa0\xc2\xa03\xc2\xa0\xc2\xa0|\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0|\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0|\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0|", 
"\xe2\x80\x8b|\xc2\xa0\xc2\xa04\xc2\xa0\xc2\xa0|\xc2\xa0\xc2\xa05\xc2\xa0\xc2\xa0|null\xc2\xa0|null\xc2\xa0|\xc2\xa0123\xc2\xa0|", 
"\xe2\x80\x8b+-----+-----+-----+-----+-----+"};

```

May be we should throw an error for "lua output" case.

On 10/07/2020 13:03, Aleksandr Lyapunov wrote:
> Introduce space:fselect and index:fselect.
> The example is better than explanation:
>
> tarantool> _user:fselect{}
> ---
> - - ​+-----+-----+-------------+------+--------------------------------------------+
>    - ​| id  |owner|    name     | type |                    auth                    |
>    - ​+-----+-----+-------------+------+--------------------------------------------+
>    - ​|  0  |  1  |   "guest"   |"user"|{"chap-sha1":"vhvewKp0tNyweZQ+cFKAlsyphfg="}|
>    - ​|  1  |  1  |   "admin"   |"user"|                     {}                     |
>    - ​|  2  |  1  |  "public"   |"role"|                     {}                     |
>    - ​|  3  |  1  |"replication"|"role"|                     {}                     |
>    - ​| 31  |  1  |   "super"   |"role"|                     {}                     |
>    - ​+-----+-----+-------------+------+--------------------------------------------+
> ...
>
>
> Aleksandr Lyapunov (1):
>    Introduce fselect - formatted select
>
>   src/box/lua/schema.lua      | 105 ++++++++++++++++++++++++++++++++
>   test/engine/select.result   | 142 ++++++++++++++++++++++++++++++++++++++++++++
>   test/engine/select.test.lua |  25 ++++++++
>   3 files changed, 272 insertions(+)
>

  parent reply	other threads:[~2020-07-10 15:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-10 10:03 Aleksandr Lyapunov
2020-07-10 10:03 ` [Tarantool-patches] [PATCH] Introduce fselect - formatted select Aleksandr Lyapunov
2020-09-14 19:02   ` Alexander Turenko
2020-07-10 10:08 ` [Tarantool-patches] [PATCH] Formatted select in lua console Aleksandr Lyapunov
2020-07-10 15:37 ` Oleg Babin [this message]
2020-07-13  8:52   ` Aleksandr Lyapunov

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=37453fed-c16b-5644-b9ff-31373c64ca18@tarantool.org \
    --to=olegrok@tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=alyapunov@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH] Formatted select in lua console' \
    /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