Sha256: bacda77cc4bda2a7f97419c290f3bb6de65e124e45d565041425a3d116ffae28

Contents?: true

Size: 797 Bytes

Versions: 18

Compression:

Stored size: 797 Bytes

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 ActiveRecordSpannerAdapter
  class ForeignKey
    attr_accessor :table_name, :name, :columns, :ref_table, :ref_columns,
                  :on_delete, :on_update

    def initialize \
        table_name,
        name,
        columns,
        ref_table,
        ref_columns,
        on_delete: nil,
        on_update: nil
      @table_name = table_name
      @name = name
      @columns = Array(columns)
      @ref_table = ref_table
      @ref_columns = Array(ref_columns)
      @on_delete = on_delete unless on_delete == "NO ACTION"
      @on_update = on_update unless on_update == "NO ACTION"
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
activerecord-spanner-adapter-1.6.0 lib/activerecord_spanner_adapter/foreign_key.rb
activerecord-spanner-adapter-1.5.1 lib/activerecord_spanner_adapter/foreign_key.rb
activerecord-spanner-adapter-1.5.0 lib/activerecord_spanner_adapter/foreign_key.rb
activerecord-spanner-adapter-1.4.4 lib/activerecord_spanner_adapter/foreign_key.rb
activerecord-spanner-adapter-1.4.3 lib/activerecord_spanner_adapter/foreign_key.rb
activerecord-spanner-adapter-1.4.2 lib/activerecord_spanner_adapter/foreign_key.rb
activerecord-spanner-adapter-1.4.1 lib/activerecord_spanner_adapter/foreign_key.rb
activerecord-spanner-adapter-1.4.0 lib/activerecord_spanner_adapter/foreign_key.rb
activerecord-spanner-adapter-1.3.1 lib/activerecord_spanner_adapter/foreign_key.rb
activerecord-spanner-adapter-1.2.2 lib/activerecord_spanner_adapter/foreign_key.rb
activerecord-spanner-adapter-1.2.1 lib/activerecord_spanner_adapter/foreign_key.rb
activerecord-spanner-adapter-1.2.0 lib/activerecord_spanner_adapter/foreign_key.rb
activerecord-spanner-adapter-1.1.0 lib/activerecord_spanner_adapter/foreign_key.rb
activerecord-spanner-adapter-1.0.1 lib/activerecord_spanner_adapter/foreign_key.rb
activerecord-spanner-adapter-1.0.0 lib/activerecord_spanner_adapter/foreign_key.rb
activerecord-spanner-adapter-0.7.0 lib/activerecord_spanner_adapter/foreign_key.rb
activerecord-spanner-adapter-0.6.0 lib/activerecord_spanner_adapter/foreign_key.rb
activerecord-spanner-adapter-0.5.0 lib/activerecord_spanner_adapter/foreign_key.rb