[tarantool-patches] Re: [RFC] box/lua/console: Add console.fmt module

Cyrill Gorcunov gorcunov at gmail.com
Fri Jun 21 15:33:57 MSK 2019


On Fri, Jun 21, 2019 at 03:11:44PM +0300, Konstantin Osipov wrote:
> > 
> > But it will break backward compatibility, is it ok?
> 
> Yes, it's OK for 2.x series.

OK

> > 
> > Previously you pointed that we might need to support
> > json/sql formats and such. Could you please elaborate
> > with some examples so I would treat them as a vectore
> > where to move in general design.
> 
> For JSON, please take a look at how MongoDB presents its output.
> 
> For SQL, PostgreSQL or MySQL or CockroachDB would be nice -they
> even colorize table headings. In any case, SQL demands tabular
> form. Tabular output is difficult. Especially with non-ascii
> characters and alphabets, which have digraphs, and ligatures.

I see, thanks! Knowing that I should review the engine to make it
more flexible. Also thought about line-oriented mode, say one defines
(in lua mode)

# > a = {1,2,3}
# > a
# {1,2,3}

but then recode on the fly:

# console.fmt(json,a)
# {"a":[1,2,3]}

or something like that.




More information about the Tarantool-patches mailing list