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

Add a way to implicitly create declarations, potentially from resolve #1582

Open
Ekrekr opened this issue Nov 21, 2023 · 1 comment
Open

Comments

@Ekrekr
Copy link
Contributor

Ekrekr commented Nov 21, 2023

We've been discussing this as part of new features for v3.0.0 - this could be a format that one of the utility functions could take:

implicitResolve({database, schema, name}}, which creates a declaration if it does not exist.

@BenBirt
Copy link
Collaborator

BenBirt commented Nov 21, 2023

"If it does not exist" is tricky - it can only really work if the function is only callable in a Contextable context (i.e. it can't be callable from "normal" JS). This is because we don't know what exists or what doesn't until all non-Contextable JS has been executed. (As an aside, it is for this reason that inline tables never really worked.)

But Contextable functions are not (currently) expected to be able to add nodes to the DAG. We'd have to be careful to ensure that actually makes sense / ordering constraints are preserved.

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

No branches or pull requests

2 participants