Code Monkey home page Code Monkey logo

Comments (3)

oleg-jukovec avatar oleg-jukovec commented on August 29, 2024

The original pull request introduces table and ttable output formats for the tt console:
#535

The pull request introduces format for standalone tuples:
tarantool/tarantool#8549

from tt.

oleg-jukovec avatar oleg-jukovec commented on August 29, 2024

Blocked by: tarantool/tarantool#10005

We discussed the issue with @sergepetrenko and decided to implement the feature by our team. It does not look like a big deal (but it may take time for RFC/approve/etc).

from tt.

oleg-jukovec avatar oleg-jukovec commented on August 29, 2024

The idea is here to implement console.eval analogue in the file:
https://github.com/tarantool/tt/blob/master/cli/connect/lua/console_eval_func_body.lua
We already have something like that in:
https://github.com/tarantool/tt/blob/master/cli/connect/lua/eval_func_body.lua

And call it instead. The difference will be after the line:
https://github.com/tarantool/tarantool/blob/b32b20c6640bb0b1a6ca278bad8061529d46b5b0/src/box/lua/console.lua#L428

Here we need to transform raw lua-tuples and form a table with a metadata(format) in the SQL manner:

> box.execute([[SELECT * FROM SEQSCAN TABLE1;]])
---
- metadata:
  - name: COLUMN1
    type: integer
  - name: COLUMN2
    type: string
  rows:
  - [10, 'Hello SQL world!']
  - [20, 'Hello LUA world!']
...

It could although require an additional flag to notify the tt that the source data is a raw lua tuples. It will help to output into Lua/YAML as before:

- metadata:
  - name: COLUMN1
    type: integer
  - name: COLUMN2
    type: string
  lua: true
  rows:
  - [10, 'Hello SQL world!']
  - [20, 'Hello LUA world!']

As result, we will able to print the data in table/ttable/Lua/yaml format on the tt side.

from tt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.