module ActiveRecord::CockroachDB::AttributeMethodsMonkeyPatch
Private Instance Methods
attributes_for_create(attribute_names)
click to toggle source
Filter out rowid so it doesn't get inserted by ActiveRecord
. rowid is a column added by CockroachDB
for tables that don't define primary keys. CockroachDB
will automatically insert rowid values. See www.cockroachlabs.com/docs/v19.2/create-table.html#create-a-table.
Calls superclass method
# File lib/active_record/connection_adapters/cockroachdb/attribute_methods.rb, line 11 def attributes_for_create(attribute_names) super.reject { |name| name == ConnectionAdapters::CockroachDBAdapter::DEFAULT_PRIMARY_KEY } end
attributes_for_update(attribute_names)
click to toggle source
Filter out rowid so it doesn't get updated by ActiveRecord
. rowid is a column added by CockroachDB
for tables that don't define primary keys. CockroachDB
will automatically insert rowid values. See www.cockroachlabs.com/docs/v19.2/create-table.html#create-a-table.
Calls superclass method
# File lib/active_record/connection_adapters/cockroachdb/attribute_methods.rb, line 19 def attributes_for_update(attribute_names) super.reject { |name| name == ConnectionAdapters::CockroachDBAdapter::DEFAULT_PRIMARY_KEY } end