into record for conversions

Convert value to record.

Signature

> into record

Input/output types:

inputoutput
datetimerecord
durationrecord
list<any>record
rangerecord
recordrecord
tablerecord

Examples

Convert from one row table to record

> [[value]; [false]] | into record
╭───────┬───────╮
│ value │ false │
╰───────┴───────╯

Convert from list to record

> [1 2 3] | into record
╭───┬───╮
│ 01 │
│ 12 │
│ 23 │
╰───┴───╯

Convert from range to record

> 0..2 | into record
╭───┬───╮
│ 00 │
│ 11 │
│ 22 │
╰───┴───╯

convert duration to record (weeks max)

> (-500day - 4hr - 5sec) | into record
╭────────┬────╮
│ week   │ 71 │
│ day    │ 3  │
│ hour   │ 4  │
│ second │ 5  │
│ sign   │ -  │
╰────────┴────╯

convert record to record

> {a: 1, b: 2} | into record
╭───┬───╮
│ a │ 1 │
│ b │ 2 │
╰───┴───╯

convert date to record

> 2020-04-12T22:10:57+02:00 | into record
╭──────────┬────────╮
│ year     │ 2020   │
│ month    │ 4      │
│ day      │ 12     │
│ hour     │ 22     │
│ minute   │ 10     │
│ second   │ 57     │
│ timezone │ +02:00 │
╰──────────┴────────╯