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

sql column label #801

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

alixander
Copy link
Collaborator

allow as a workaround to reserved keyword keys for sql tables

x: {
  shape: sql_table
  w: int { label: width }
}

@janydoe
Copy link
Contributor

janydoe commented Jun 21, 2023

Your solution will break my classes to easy create PK and FK :)

classes: {
  PK: { label: uuid; constraint: primary_key }
  FK: { label: uuid; constraint: foreign_key }
}

files: {
  shape: sql_table

  id.class: PK
  user_id.class: FK
}

But at the moment we can use hacks to use reserved words:

x: {
  shape: sql_table
  \ width: int
  "height ": int
}

Related: #1419 (comment)

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

Successfully merging this pull request may close these issues.

None yet

2 participants