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

Converting from BasicSchema to TypeLevelSchema #159

Open
kris-brown opened this issue Dec 23, 2024 · 3 comments
Open

Converting from BasicSchema to TypeLevelSchema #159

kris-brown opened this issue Dec 23, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@kris-brown
Copy link
Collaborator

ACSets.jl allows us to go from TypeLevelSchema to BasicSchema, and I thought at some point I needed to go the other way around and wrote this one-liner:

""" Convert a Schema to a Type-level schema """
TypeLevelBasicSchema(s::BasicSchema{Name}) where {Name} = 
  TypeLevelBasicSchema{Name, Tuple{s.obs...}, Tuple{s.homs...}, 
                       Tuple{s.attrtypes...}, Tuple{s.attrs...}, Tuple{s.eqs...}}

TypeLevelBasicSchema(s::Type{<:TypeLevelBasicSchema}) = s

But then I happened to not need to. Still, this might be a feature that someone wants?

@kris-brown kris-brown added the enhancement New feature or request label Dec 23, 2024
@slwu89
Copy link
Member

slwu89 commented Dec 23, 2024

Actually I was thinking about that exact feature lately during pondering #158.

@kris-brown
Copy link
Collaborator Author

Ah ok well feel free to copypaste that line into your code for the time being! It could be a one-line PR that gets merged before yours does

@slwu89
Copy link
Member

slwu89 commented Dec 23, 2024

I'm nowhere near to getting anything merged on the SQL front, SQL breaks the relational model in so many ways that it will still take some time to figure out under what cases it makes sense to do the interop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants