Sha256: ac3c865d62c16353550fe44df93a4172c28c13b9e7d101ed11f490262e394f00
Contents?: true
Size: 724 Bytes
Versions: 1
Compression:
Stored size: 724 Bytes
Contents
module ActiveRecord module ConnectionAdapters module PostgreSQL module DatabaseStatements def sql_for_insert(sql, pk, id_value, sequence_name, 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
composite_primary_keys-11.0.0.rc2 | lib/composite_primary_keys/connection_adapters/postgresql/database_statements.rb |