Sha256: 090ccc5ef0587a37be2a9b41d4f713b0eb5cfdcaa8914cdf3d10428588bd8c6a

Contents?: true

Size: 539 Bytes

Versions: 2

Compression:

Stored size: 539 Bytes

Contents

# frozen_string_literal: true

module TableSaw
  class InformationSchema
    def belongs_to
      foreign_key_relationships.belongs_to
    end

    # rubocop:disable Naming/PredicateName
    def has_many
      foreign_key_relationships.has_many
    end
    # rubocop:enable Naming/PredicateName

    def primary_keys
      @primary_keys ||= TableSaw::Queries::PrimaryKeys.new.call
    end

    private

    def foreign_key_relationships
      @foreign_key_relationships ||= TableSaw::Queries::ForeignKeyRelationships.new
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
table_saw-1.0.1 lib/table_saw/information_schema.rb
table_saw-1.0.0 lib/table_saw/information_schema.rb