Sha256: 4b905e90991b4998b7c3b5e269601830825e7558355ffb6b7600aa4760532814
Contents?: true
Size: 699 Bytes
Versions: 16
Compression:
Stored size: 699 Bytes
Contents
module ActiveRecord module ConnectionAdapters module PostgreSQL module DatabaseStatements def sql_for_insert(sql, pk, binds) # :nodoc: if pk.nil? # Extract the table from the insert sql. Yuck. table_ref = extract_table_ref_from_insert_sql(sql) pk = primary_key(table_ref) if table_ref end # CPK # if pk = suppress_composite_primary_key(pk) # sql = "#{sql} RETURNING #{quote_column_name(pk)}" #end # NOTE pk can be false. if pk sql = "#{sql} RETURNING #{quote_column_names(pk)}" end super end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems