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
)
._has_all_primary_key_values?
def
self
.
_has_all_primary_key_values?
(
primary_key
,
values
)
-
>
Boolean
- (Boolean)
._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
,
is_mutation
)
._set_composite_primary_key_values
def
self
.
_set_composite_primary_key_values
(
primary_key
,
values
,
is_mutation
)
._set_primary_key_value
def
self
.
_set_primary_key_value
(
values
,
is_mutation
)
._set_single_primary_key_value
def
self
.
_set_single_primary_key_value
(
primary_key
,
values
,
is_mutation
)
._should_use_standard_insert_record?
def
self
.
_should_use_standard_insert_record?
(
values
)
-
>
Boolean
- (Boolean)
._upsert_record
def
self
.
_upsert_record
(
values
,
returning
)
.active_transaction?
def
self
.
active_transaction?
()
-
>
Boolean
- (Boolean)
.buffered_mutations?
def
self
.
buffered_mutations?
()
-
>
Boolean
- (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.
.has_auto_generated_primary_key?
def
self
.
has_auto_generated_primary_key?
()
-
>
Boolean
- (Boolean)
.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
)
.is_auto_generated?
def
self
.
is_auto_generated?
(
col
)
-
>
Boolean
- (Boolean)
.spanner_adapter?
def
self
.
spanner_adapter?
()
-
>
Boolean
- (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"