class SequelSchemaDotGenerator::SchemaSourceType::Base
Public Class Methods
new(db, tables)
click to toggle source
Initialize Schema Source Type
Tables could be retrieved from db connection, but there is plan to provide control over what tables will be in output structure
@param [Sequel::Database] db for which should be acquired data @param [Array] tables for which should be acquired data
# File lib/sequel_schema_dot_generator/schema_source_types/base.rb, line 11 def initialize db, tables @tables = tables @db = db end
Public Instance Methods
relations()
click to toggle source
@return [Array] associations for tables given to constructor
Each item is array of [<foreign_table>, <id>, <table_name>, <foreign_column>]
# File lib/sequel_schema_dot_generator/schema_source_types/base.rb, line 18 def relations raise NotImplementedError end