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

Tevon/add query params #22

Merged
merged 5 commits into from
Apr 1, 2024
Merged

Tevon/add query params #22

merged 5 commits into from
Apr 1, 2024

Conversation

tevonsb
Copy link
Contributor

@tevonsb tevonsb commented Mar 30, 2024

Adding parameters to queries.

These can be added at the top of the query page, including a description, name, default value.

Then these are saved to the query when they user selects save and run.

These are passed into the query/run method as query params, which are then added to the query via prepared statements.

@tevonsb tevonsb added wip Work in progress and removed wip Work in progress labels Mar 30, 2024
Copy link
Contributor

@glpierce glpierce left a comment

Choose a reason for hiding this comment

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

A couple console logs to remove. Also, I think we should merge in master and make sure everything still works as expected

const matches = sql.match(/{{(.*?)}}/g);
let paramIndex = 1;
const params: any[] = [];
console.log("Matches", matches);
Copy link
Contributor

Choose a reason for hiding this comment

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

rm

@@ -71,6 +78,7 @@ const Page: React.FC<UserQueryPageProps> = ({ params: { userQueryId } }) => {
return (
<div className="flex flex-col h-full">
<QueryHeader query={userQuery} />
<QueryParameters parameters={parameters} setParameters={setParameters} />
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be good to merge master into this branch to see how this component interacts with the Pipelin/SQL tabs

frontend/src/components/query/query-parameters.tsx Outdated Show resolved Hide resolved
@tevonsb tevonsb merged commit ea27513 into master Apr 1, 2024
2 checks passed
@tevonsb tevonsb deleted the tevon/add-query-params branch April 1, 2024 22:27
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