-
Notifications
You must be signed in to change notification settings - Fork 235
Add double-bracket strings #752
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
Conversation
Would close #721. I need to add to the docs. I had previously implemented an |
Currently the SQL formatter is changing Otherwise we'll have to replace it with something and then swap it back after the formatting, which would be a bit inelegant. |
Possibly the way to do this is to surround double-bracket strings with dialect-specific "quotes" — e.g. for MySQL & BigQuery, we use backticks; for others we use double-quotes. I can't see an escape hatch like we do for jinja expressions (https://github.com/prql/prql/blob/0.2.0/prql-compiler/src/sql/translator.rs#L46). |
fyi, just as a related data point, our PRQL pipeline already does this kind of replacing post-compilation as we use postgres's |
Thanks for that case @mklopets I increasingly think we should parse to some representation of "raw ident", e.g. backticks, and then based on the dialect convert to either backticks or double-quotes. |
I'm planning to pursue this, combined with the approach in #809. So: from foo
select `{{bar}}` becomes, for dialects that use double-quotes to surround "raw identifiers": select "{bar}" from foo or for those that use backticks: select `{bar}` from foo The only change here would be to compile Edit: for any future travelers, I didn't end up pursuing this exact approach — the s-string approach seems to cover the cases, with fewer additional language features. |
* Remove unnecessary steps from GHAs
As dscribed in the comment, not worth the extra time to pin the version
* Add section to contributing explaining our tests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * . * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* rename java test package name * cross try * release conf * fix tests * update doc * profile adjustment * pre-commit * update developers Co-authored-by: Maximilian Roos <5635139+max-sixty@users.noreply.github.com> Co-authored-by: Maximilian Roos <m@maxroos.com>
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 1 to 3. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](actions/setup-java@v1...v3) --- updated-dependencies: - dependency-name: actions/setup-java dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Improve GHA caching Swap out actions-rs for @baptiste0928 crate * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Now we no longer have the playground, no need to use wasm to test the book
Removing this because it generates a 404, as per #818. Is there a way to link to a section on the homepage? Linking to prql-lang.org/index.html#Bindings doesn't seem to work either.
…#817) Bumps [@testing-library/user-event](https://github.com/testing-library/user-event) from 14.2.3 to 14.2.5. - [Release notes](https://github.com/testing-library/user-event/releases) - [Changelog](https://github.com/testing-library/user-event/blob/main/CHANGELOG.md) - [Commits](testing-library/user-event@v14.2.3...v14.2.5) --- updated-dependencies: - dependency-name: "@testing-library/user-event" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* docs: link to list of bindings from faq * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * avoid setting empty id for most sections * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Fix python releaes workflow Really we should have a test release workflow running which does a dry-run, so we don't get these sorts of problems (which I'm sure was my fault tbc...)
* Adding row_number_id to ROW_NUMBER() SQL to make them unique * Adding tests for #826 * Fixing clippy * Testing raw flag to pass the deadlinks check * Apply suggestions from code review Try reverting raw link change Co-authored-by: Maximilian Roos <5635139+max-sixty@users.noreply.github.com>
* Only run check-links on modified files And then run every day on all. This should reduce the issues we had in #853, not the first time we've had them. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Only install wasm-pack in CI when needed GHA builds are getting longer now, we're well past our 1 minute target... Though this isn't going to help much!
* Add some workflows to track our compilation time It's getting quite long now — CI jobs take 90-150 seconds, almost all of which is compilation, even with a cache. Locally I'm seeing more like 20s after wiping `target`. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * . * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * . * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Busts cache so #860 will cache correctly
* Remove cached cargo-timings files in GHA
Another cache bust, this time for #864
Weirdly the book printed an error, but passed?! https://github.com/prql/prql/runs/7530558870?check_suite_focus=true (this was from #1513, zero stress tbc)
* Fix BigQuery quoting Not sure this will be the end of it, but progress * .
Bumps [insta](https://github.com/mitsuhiko/insta) from 1.16.0 to 1.17.0. - [Release notes](https://github.com/mitsuhiko/insta/releases) - [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md) - [Commits](https://github.com/mitsuhiko/insta/commits) --- updated-dependencies: - dependency-name: insta dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Guessing this was an oversight
* Switch implicit `compile` tests to actual `compile` tests
Bumps [wasm-react-scripts](https://github.com/Cosmian/create-react-app/tree/HEAD/packages/react-scripts) from 5.0.2 to 5.0.3. - [Release notes](https://github.com/Cosmian/create-react-app/releases) - [Changelog](https://github.com/Cosmian/create-react-app/blob/main/CHANGELOG-1.x.md) - [Commits](https://github.com/Cosmian/create-react-app/commits/react-error-overlay@5.0.3/packages/react-scripts) --- updated-dependencies: - dependency-name: wasm-react-scripts dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Not sure what's going on with the commit history but it'll be squashed... Added some docs too; lmk if anything is unclear! |
No description provided.