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

Do we need dm_cast() ? #2141

Open
moodymudskipper opened this issue Nov 14, 2023 · 1 comment
Open

Do we need dm_cast() ? #2141

moodymudskipper opened this issue Nov 14, 2023 · 1 comment
Milestone

Comments

@moodymudskipper
Copy link
Collaborator

moodymudskipper commented Nov 14, 2023

Since we have dm_ptype() already.

If I have a named list of tables, or a dm of tables without constraints, or without all the constraints I need, I might use dm_cast(incomplete_dm, my_dm_ptype) and it would apply the missing constraints if applicable, or fail.

Is there a simple way to do such thing with our current tools ?

The idea I have is to edit the structure of the ptype or template dm to change the tables, but it means I keep the same uuid and I'm not sure if it's a problem or not. In any case this would be using implementation details so not good practice.

@krlmlr krlmlr added this to the api milestone Nov 21, 2023
@krlmlr
Copy link
Collaborator

krlmlr commented Nov 21, 2023

How is this related to dm_decompose() and dm_get_tables(keyed = TRUE) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants