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 44639314B3 for ; Fri, 21 Jun 2019 08:34:00 -0400 (EDT) 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 bfnV6BoY-HlU for ; Fri, 21 Jun 2019 08:34:00 -0400 (EDT) Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id E455B3147A for ; Fri, 21 Jun 2019 08:33:59 -0400 (EDT) Received: by mail-lj1-f175.google.com with SMTP id t28so5795353lje.9 for ; Fri, 21 Jun 2019 05:33:59 -0700 (PDT) Date: Fri, 21 Jun 2019 15:33:57 +0300 From: Cyrill Gorcunov Subject: [tarantool-patches] Re: [RFC] box/lua/console: Add console.fmt module Message-ID: <20190621123356.GA24106@uranus> References: <20190620215405.9338-1-gorcunov@gmail.com> <20190621073241.GJ18958@atlas> <20190621073643.GK18958@atlas> <20190621080918.GA18551@uranus> <20190621121144.GA5998@atlas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190621121144.GA5998@atlas> 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: Konstantin Osipov Cc: tarantool-patches@freelists.org, Alexander Turenko 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.