Method: Clickhouse::Connection::Query#insert_rows
- Defined in:
- lib/clickhouse/connection/query.rb
#insert_rows(table, options = {}) ⇒ Object
47 48 49 50 51 52 53 |
# File 'lib/clickhouse/connection/query.rb', line 47 def insert_rows(table, = {}) [:csv] ||= begin [:rows] ||= yield([]) generate_csv [:rows], [:names] end execute "INSERT INTO #{table} FORMAT CSVWithNames", [:csv] end |