Skip to content

Add PRQL: Generate SQL File command and editor context menu options - #49

Merged
max-sixty merged 5 commits into
PRQL:mainfrom
RandomFractals:main
Feb 6, 2023
Merged

max-sixty merged 5 commits into
PRQL:mainfrom
RandomFractals:main

Conversation

@RandomFractals

Copy link
Copy Markdown
Collaborator

Implements basic Prql to Sql file generation workflow as described in #42.

I added database icon menu option to the editor title bar context menu as both prql and sql files use similar icons, and there are no other database related actions for open prql documents implemented by Prql extension currently.

Preview of integrated workflow with this functionality using DuckDB Sql Tools and sample chinook.duckdb and daily-invoice-totals.prql from our extension docs repo:

duckdb-prql-sql-run

Comment thread src/sql_output/utils.ts

export interface CompilationResult {
status: "ok" | "error";
status: 'ok' | 'error';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If we should add a formatter for these, lmk, we have loads of devops in the main repo, but I haven't spent that much time with this repo

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.

no big deal. I wanted to cleanup vscode imports and decided to do strings too.

@max-sixty

Copy link
Copy Markdown
Member

That's so nice @RandomFractals . Really cool, thank you!

@max-sixty
max-sixty merged commit b594eff into PRQL:main Feb 6, 2023
max-sixty added a commit that referenced this pull request Feb 6, 2023
This should automate some of the formatting changes folks are doing. From #49 (comment)
@max-sixty max-sixty mentioned this pull request Feb 6, 2023
max-sixty added a commit that referenced this pull request Feb 6, 2023
This should automate some of the formatting changes folks are doing. From #49 (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.

2 participants