Sha256: 017fb4a475e4446309a20a604d6ef60ef86a6157a8432e9c0718e87c36662955
Contents?: true
Size: 646 Bytes
Versions: 6
Compression:
Stored size: 646 Bytes
Contents
# frozen_string_literal: true module TableSaw module DependencyGraph class AddDirective attr_reader :table_name, :partial, :has_many attr_accessor :ids def initialize(table_name, ids: [], partial: true, has_many: []) @table_name = table_name @ids = ids @partial = partial @has_many = has_many end alias partial? partial def selectable? partial? && Array(ids).size.positive? end def queryable? !partial || selectable? end def primary_key TableSaw.information_schema.primary_keys[table_name] end end end end
Version data entries
6 entries across 6 versions & 1 rubygems