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 query/4 that can receive a Req.Request #6

Merged
merged 2 commits into from
Nov 27, 2024
Merged

Add query/4 that can receive a Req.Request #6

merged 2 commits into from
Nov 27, 2024

Conversation

philss
Copy link
Contributor

@philss philss commented Nov 27, 2024

No description provided.

lib/req_ch.ex Outdated
@@ -127,6 +127,59 @@ defmodule ReqCH do
|> Req.post(body: sql_query)
end
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 fully delete the version with query/3.

lib/req_ch.ex Outdated
sql_query_params :: Map.t() | Keyword.t(),
opts :: Keyword.t()
) :: {:ok, Req.Response.t()} | {:error, binary()}
def query(req, sql_query, sql_query_params, opts)
Copy link
Contributor

Choose a reason for hiding this comment

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

Once you delete query/3:

Suggested change
def query(req, sql_query, sql_query_params, opts)
def query(req, sql_query, sql_query_params \\ [], opts \\ [])

@philss philss merged commit 46b7a8f into main Nov 27, 2024
3 checks passed
@josevalim josevalim deleted the ps-add-query-4 branch January 23, 2025 09:35
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