Sha256: dea156acb079d4aeeefa0b50e9536e249f0e0b0f7b6a4adb0669116a52d2ee44
Contents?: true
Size: 1.01 KB
Versions: 17
Compression:
Stored size: 1.01 KB
Contents
# Copyright 2020 Google LLC # # Use of this source code is governed by an MIT-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/MIT. module ActiveRecord module ConnectionAdapters class SpannerSchemaCache < SchemaCache def initialize conn @primary_and_parent_keys = {} super end def initialize_dup other @primary_and_parent_keys = @primary_and_parent_keys.dup super end def encode_with coder coder["primary_and_parent_keys"] = @primary_and_parent_keys super end def init_with coder @primary_and_parent_keys = coder["primary_and_parent_keys"] super end def primary_and_parent_keys table_name @primary_and_parent_keys[table_name] ||= if data_source_exists? table_name connection.primary_and_parent_keys table_name end end def clear! @primary_and_parent_keys.clear super end end end end
Version data entries
17 entries across 17 versions & 1 rubygems