edgedb / edgedb-ui

The home of EdgeDB UI and all related shared UI components
Apache License 2.0
50 stars 7 forks source link

`Invalid parameter cast` for array of tuples #253

Closed jackfischer closed 10 months ago

jackfischer commented 1 year ago
type Example {
    required x: str;
    required y: str;
}
with  examples := <array<tuple<
    x: str,
    y: str,
  >>>$examples,

for e in array_unpack(examples) union (
  insert Example {
    x:=e.x,
    y:=e.y
  }
)
Screenshot 2023-09-14 at 4 03 02 PM
raddevon commented 12 months ago

In the CLI REPL, I get Unimplemented input type descriptor: Array(ArrayTypeDescriptor { id: 72fb1422-dca3-5923-b314-f19f416e38c7, type_pos: TypePos(1), dimensions: [None] })

jackfischer commented 10 months ago

Thank you @jaclarke - should i file separately for the CLI?

jaclarke commented 10 months ago

It looks like there's already an issue open for array inputs (https://github.com/edgedb/edgedb-cli/issues/714) and tuples (https://github.com/edgedb/edgedb-cli/issues/962).

@quinchs Do you know what the priority is for these issues? It looks like there's something of an open question on how to actually represent the input/how it would work with rustyline?

quinchs commented 10 months ago

Do you know what the priority is for these issues

No, I don't, but I can work on that now.

how to actually represent the input/how it would work with rustyline?

I think we could just repeatedly ask for the inner element input until the array is completed via keybind? I'll play around and find something.