-
Notifications
You must be signed in to change notification settings - Fork 28
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
base: master
Are you sure you want to change the base?
Conversation
8722e61
to
13794b4
Compare
13794b4
to
287519b
Compare
There was a problem hiding this 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?
src/honeysql_postgres/format.cljc
Outdated
(defmethod format-clause :explain [[_ [params]] _] | ||
(if (empty? params) | ||
"EXPLAIN" | ||
(let [params-string-map |
There was a problem hiding this comment.
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?
There was a problem hiding this 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"] | ||
``` | ||
|
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
Resolves issue: #68