Creates an object (or multiple objects) and saves it to the database. This method will use mutations instead
of DML if there is no active transaction, or if the active transaction has been created with the option
isolation: :buffered_mutations.
.delete_all
defself.delete_all()
Deletes all records of this class. This method will use mutations instead of DML if there is no active
transaction, or if the active transaction has been created with the option isolation: :buffered_mutations.
Deletes the object in the database. This method will use mutations instead
of DML if there is no active transaction, or if the active transaction has been created with the option
isolation: :buffered_mutations.
#update
defupdate(attributes)
Updates the given attributes of the object in the database. This method will use mutations instead
of DML if there is no active transaction, or if the active transaction has been created with the option
isolation: :buffered_mutations.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# activerecord-spanner-adapter - Class ActiveRecord::Base (v2.2.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.2.0 (latest)](/ruby/docs/reference/activerecord-spanner-adapter/latest/ActiveRecord-Base)\n- [2.1.0](/ruby/docs/reference/activerecord-spanner-adapter/2.1.0/ActiveRecord-Base)\n- [2.0.0](/ruby/docs/reference/activerecord-spanner-adapter/2.0.0/ActiveRecord-Base) \nReference documentation and code samples for the activerecord-spanner-adapter class ActiveRecord::Base. \n\nInherits\n--------\n\n- Object\n\nMethods\n-------\n\n### ._buffer_record\n\n def self._buffer_record(values, method, returning)\n\n### ._convert_primary_key\n\n def self._convert_primary_key(primary_key_value, returning)\n\n### ._has_all_primary_key_values?\n\n def self._has_all_primary_key_values?(primary_key, values) -\u003e Boolean\n\n**Returns**\n\n- (Boolean)\n\n### ._insert_record\n\n def self._insert_record(*args)\n\n### ._insert_record_dml\n\n def self._insert_record_dml(values, returning)\n\n### ._internal_insert_record\n\n def self._internal_insert_record(values)\n\n### ._set_composite_primary_key_value\n\n def self._set_composite_primary_key_value(primary_key, values, is_mutation)\n\n### ._set_composite_primary_key_values\n\n def self._set_composite_primary_key_values(primary_key, values, is_mutation)\n\n### ._set_primary_key_value\n\n def self._set_primary_key_value(values, is_mutation)\n\n### ._set_single_primary_key_value\n\n def self._set_single_primary_key_value(primary_key, values, is_mutation)\n\n### ._should_use_standard_insert_record?\n\n def self._should_use_standard_insert_record?(values) -\u003e Boolean\n\n**Returns**\n\n- (Boolean)\n\n### ._upsert_record\n\n def self._upsert_record(values, returning)\n\n### .active_transaction?\n\n def self.active_transaction?() -\u003e Boolean\n\n**Returns**\n\n- (Boolean)\n\n### .buffered_mutations?\n\n def self.buffered_mutations?() -\u003e Boolean\n\n**Returns**\n\n- (Boolean)\n\n### .create\n\n def self.create(attributes = nil, &block)\n\n### .create!\n\n def self.create!(attributes = nil, &block)\n\nCreates an object (or multiple objects) and saves it to the database. This method will use mutations instead\nof DML if there is no active transaction, or if the active transaction has been created with the option\nisolation: :buffered_mutations.\n\n### .delete_all\n\n def self.delete_all()\n\nDeletes all records of this class. This method will use mutations instead of DML if there is no active\ntransaction, or if the active transaction has been created with the option isolation: :buffered_mutations.\n\n### .has_auto_generated_primary_key?\n\n def self.has_auto_generated_primary_key?() -\u003e Boolean\n\n**Returns**\n\n- (Boolean)\n\n### .insert!\n\n def self.insert!(attributes, returning: nil, **kwargs)\n\n### .insert_all\n\n def self.insert_all(attributes, returning: nil, **_kwargs)\n\n### .insert_all!\n\n def self.insert_all!(attributes, returning: nil, **_kwargs)\n\n### .is_auto_generated?\n\n def self.is_auto_generated?(col) -\u003e Boolean\n\n**Returns**\n\n- (Boolean)\n\n### .spanner_adapter?\n\n def self.spanner_adapter?() -\u003e Boolean\n\n**Returns**\n\n- (Boolean)\n\n### .unwrap_attribute\n\n def self.unwrap_attribute(attr_or_value)\n\n### .upsert\n\n def self.upsert(attributes, returning: nil, **kwargs)\n\n### .upsert_all\n\n def self.upsert_all(attributes, returning: nil, unique_by: nil, **kwargs)\n\n### #destroy\n\n def destroy()\n\nDeletes the object in the database. This method will use mutations instead\nof DML if there is no active transaction, or if the active transaction has been created with the option\nisolation: :buffered_mutations.\n\n### #update\n\n def update(attributes)\n\nUpdates the given attributes of the object in the database. This method will use mutations instead\nof DML if there is no active transaction, or if the active transaction has been created with the option\nisolation: :buffered_mutations.\n\nConstants\n---------\n\n### VERSION_7_1\n\n**value:**Gem::Version.create \"7.1.0\"\n\n### VERSION_7_2\n\n**value:**Gem::Version.create \"7.2.0\""]]