PNixx / clickhouse-activerecord

A Ruby database ActiveRecord driver for ClickHouse
MIT License
202 stars 100 forks source link

Improve function dumps #179

Closed felix-dumit closed 1 week ago

felix-dumit commented 1 month ago

This PR contains a couple small improvements to function dumps into structure.sql:

  1. Preserve newlines, in case there are multi-line strings inside the function body
  2. Sort functions by name so it's deterministic and behaves like tables
danielwestendorf commented 1 month ago

2) is related to #181 (sorted in code instead of SQL when dumping)

felix-dumit commented 2 weeks ago

@danielwestendorf Should I revert those in this PR? or what's the best way forward?