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

better statement splitter #211

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

better statement splitter #211

wants to merge 5 commits into from

Conversation

ruslandoga
Copy link
Contributor

@ruslandoga ruslandoga commented Nov 7, 2024

Preparing for https://hexdocs.pm/ecto_sql/Ecto.Adapters.SQL.html#query_many/4

Context: plausible/analytics#4701 (comment)

TODOs:

check all(statements <- gen_statements()) do
  assert extract_statements(Enum.join(statements, ";")) == statements
  # and maybe execute them in ClickHouse
end

defp gen_statements do
  for str <- string(:printable) do
    "select '#{str}'"
  end
  
  # etc. and union them all
end

@ruslandoga ruslandoga force-pushed the proper-escaping branch 3 times, most recently from ac4cbb8 to bd1a4a6 Compare November 7, 2024 08:16
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.

1 participant