activerecord-spanner-adapter - Class ActiveRecord::Base (v2.0.0)

Reference documentation and code samples for the activerecord-spanner-adapter class ActiveRecord::Base.

Inherits

  • Object

Methods

._buffer_record

def self._buffer_record(values, method, returning)

._convert_primary_key

def self._convert_primary_key(primary_key_value, returning)

._insert_record

def self._insert_record(*args)

._insert_record_dml

def self._insert_record_dml(values, returning)

._internal_insert_record

def self._internal_insert_record(values)

._set_composite_primary_key_value

def self._set_composite_primary_key_value(primary_key, values)

._set_composite_primary_key_values

def self._set_composite_primary_key_values(primary_key, values)

._set_primary_key_value

def self._set_primary_key_value(values)

._set_single_primary_key_value

def self._set_single_primary_key_value(primary_key, values)

._should_use_standard_insert_record?

def self._should_use_standard_insert_record?(values) -> Boolean
Returns
  • (Boolean)

._upsert_record

def self._upsert_record(values, returning)

.active_transaction?

def self.active_transaction?() -> Boolean
Returns
  • (Boolean)

.buffered_mutations?

def self.buffered_mutations?() -> Boolean
Returns
  • (Boolean)

.create

def self.create(attributes = nil, &block)

.create!

def self.create!(attributes = nil, &block)

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

def self.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.

.insert!

def self.insert!(attributes, returning: nil, **kwargs)

.insert_all

def self.insert_all(attributes, returning: nil, **_kwargs)

.insert_all!

def self.insert_all!(attributes, returning: nil, **_kwargs)

.spanner_adapter?

def self.spanner_adapter?() -> Boolean
Returns
  • (Boolean)

.unwrap_attribute

def self.unwrap_attribute(attr_or_value)

.upsert

def self.upsert(attributes, returning: nil, **kwargs)

.upsert_all

def self.upsert_all(attributes, returning: nil, unique_by: nil, **kwargs)

#destroy

def destroy()

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

def update(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.

Constants

VERSION_7_1

value: Gem::Version.create "7.1.0"

VERSION_7_2

value: Gem::Version.create "7.2.0"