Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macro implementations of the Dynamic interface for struct columns #332

Open
jserranohidalgo opened this issue Feb 22, 2023 · 1 comment
Open
Labels

Comments

@jserranohidalgo
Copy link
Member

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 jserranohidalgo added the enhancement New feature or request label Feb 22, 2023
@jserranohidalgo
Copy link
Member Author

jserranohidalgo commented Feb 22, 2023

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 jserranohidalgo changed the title [Feature request]: Macro implementations of the Dynamic interface for struct columns Feb 22, 2023
@jserranohidalgo jserranohidalgo added syntax type system enhancement New feature or request and removed enhancement New feature or request labels Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

1 participant