lib/polo/sql_translator.rb
# Internal: Generates an insert SQL statement for a given record
#
# It will make use of the InsertManager class from the Arel gem to generate
# insert statements
#
Generates an insert SQL statement for a given record
It will make use of the InsertManager class from the Arel gem to generate
insert statements
Generates an insert SQL statement for a given record It will make use of the InsertManager class from the Arel gem to generate insert statements
def raw_sql_from_record(record)
      record.class.arel_table.create_insert.tap do |insert_manager|
        insert_manager.insert(insert_values(record))
      end.to_sql
    end
def raw_sql_from_record ( record ) record . class . arel_table . create_insert . tap do | insert_manager | insert_manager . insert ( insert_values ( record ) ) end . to_sql end
Internal: Generates an insert SQL statement for a given record
It will make use of the InsertManager class from the Arel gem to generate
insert statements
Internal : Generates an insert SQL statement for a given record It will make use of the InsertManager class from the Arel gem to generate insert statements
record
<not_specific>