Skip to content

feat: improve pico.sql() result formatting

Denis Smirnov requested to merge format_sql into master

Current MR is a frontend to the core changes in sbroad library: sbroad!299 (merged). With its help we'll improve Lua table result formatting:

picodata> pico.sql([[explain select * from t]])
---
- - projection ("T"."A"::integer -> "A", "T"."B"::integer -> "B")
  - '    scan "T"'
...

picodata> pico.sql([[insert into t values (2, 3)]])
---
- row_count: 1
...

picodata> pico.sql([[select * from t]])
---
- metadata:
  - {'name': 'A', 'type': 'integer'}
  - {'name': 'B', 'type': 'integer'}
  rows:
  - [1, 2]
  - [2, 3]
...
Edited by Denis Smirnov

Merge request reports