class HecksAdapters::SQLDatabase::Schema

Represents a SQL Schema

Attributes

tables[R]

Public Class Methods

factory(domain_spec) click to toggle source
# File lib/schema.rb, line 11
def self.factory(domain_spec)
  SchemaFactory.new(domain_spec).build
end
new(tables) click to toggle source
# File lib/schema.rb, line 15
def initialize(tables)
  @tables = tables
end

Public Instance Methods

to_h() click to toggle source
# File lib/schema.rb, line 19
def to_h
  tables.map { |table| [table.name.to_sym, table] }.to_h
end