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

Add support for explain #69

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

govindkrjoshi
Copy link

Resolves issue: #68

@govindkrjoshi govindkrjoshi force-pushed the add-support-for-explain branch 2 times, most recently from 8722e61 to 13794b4 Compare August 19, 2021 16:05
Copy link
Contributor

@kitallis kitallis left a comment

Choose a reason for hiding this comment

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

@govindkrjoshi Looks mostly good; added a small comment. Could you add a runnable README example; ref?

(defmethod format-clause :explain [[_ [params]] _]
(if (empty? params)
"EXPLAIN"
(let [params-string-map
Copy link
Contributor

Choose a reason for hiding this comment

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

@govindkrjoshi Shall we consider moving these static maps out to avoid creating them every time the format on explain is called?

Copy link
Contributor

@kitallis kitallis left a comment

Choose a reason for hiding this comment

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

Left a couple of minor comments. Feel free to merge after that. Approving.

(sql/format))
=> ["EXPLAIN (FORMAT JSON) SELECT * FROM PRODUCTS"]
```

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we kill these 2 extra lines? 2 lines should be enough.

@@ -240,6 +240,31 @@ The `ilike` and `not-ilike` operators can be used to query data using a pattern
0.25 0.50 0.75]
```

### explain
Copy link
Contributor

Choose a reason for hiding this comment

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

We can add this section to the index upstairs.

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