doric icon indicating copy to clipboard operation
doric copied to clipboard

Macro implementations of the Dynamic interface for struct columns

Open jserranohidalgo opened this issue 2 years ago • 1 comments

Feature suggestion

Given

dc: DoricColumn[Person]

We would like to access fields of struct columns with the dynamic interface as follows:

dc.name: DoricColumn[String]

so that doric infers the type of the field.

(`dc.name[String]: DoricColumn[String] should work too).

Current behaviour

Currently, the dynamic interface allows us to access fields of structs as follows:

dc.child.name[String]

i.e. using a reserved keyword child before actually accessing the field.

jserranohidalgo avatar Feb 22 '23 14:02 jserranohidalgo

We need macros for that. A discussion of this issue can be found at #213. Preliminary work can be found at this branch:

https://github.com/jserranohidalgo/doric/tree/jm/struct-macros

The problem of this branch is that applyDynamic is used, rather than selectDynamic.

jserranohidalgo avatar Feb 22 '23 15:02 jserranohidalgo