Skip to content

dolphin: Implement exapansion with reserved words#620

Merged
kyleconroy merged 1 commit intomasterfrom
dolphin-star-reserved
Jul 24, 2020
Merged

dolphin: Implement exapansion with reserved words#620
kyleconroy merged 1 commit intomasterfrom
dolphin-star-reserved

Conversation

@kyleconroy
Copy link
Copy Markdown
Collaborator

compiler: rename the Engine struct to Compiler
compiler: move methods onto the Compiler struct
compiler: Use backticks for reserved words in MySQL
codegen: Handle queries with backticks

compiler: rename the Engine struct to Compiler
compiler: move methods onto the Compiler struct
compiler: Use backticks for reserved words in MySQL
codegen: Handle queries with backticks
)

const starExpansionReserved = `-- name: StarExpansionReserved :many
SELECT ` + "`" + `group` + "`" + ` FROM foo
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's gross, but it works 100% of the time and doesn't require a call to strings.Replace

@kyleconroy kyleconroy merged commit 2e9294f into master Jul 24, 2020
@kyleconroy kyleconroy deleted the dolphin-star-reserved branch July 24, 2020 21:32
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.

1 participant