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

Wrong code gen when using $ #2761

Closed
davidmartos96 opened this issue Nov 30, 2023 · 2 comments
Closed

Wrong code gen when using $ #2761

davidmartos96 opened this issue Nov 30, 2023 · 2 comments

Comments

@davidmartos96
Copy link
Contributor

davidmartos96 commented Nov 30, 2023

Describe the bug

When a Table schema is defined in Dart and we use $ in the name, the code generation is invalid because Strings that use this name are not escaped or marked as raw strings.

I'm using a tool that generates the drift schema automatically based on a postgres schema and conflicting names include a $ symbol at the end.

class Todo extends Table {
  TextColumn get id => text()();

  TextColumn get listid => text().nullable()();

  TextColumn get text$ => text().named('text').nullable()();

  BoolColumn get completed => boolean()();
}
@simolus3
Copy link
Owner

Thanks for the report - I think this is fixed with 5740eb8. Unfortunately it's possible that I've missed some - if it's not too much trouble, could you try to use the development version and let me know if that fixes this for you?

@davidmartos96
Copy link
Contributor Author

@simolus3 That did the trick, thank you!

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

No branches or pull requests

2 participants