Class: Dart::Reflection::SequelTable::Reflector
- Inherits:
-
Object
- Object
- Dart::Reflection::SequelTable::Reflector
- Defined in:
- lib/dart/reflection/sequel_table/reflector.rb
Instance Method Summary collapse
- #get_relations_for_code_gen(options = {}) ⇒ Array<Relation>
- #get_schema_for_resolver(options = {}) ⇒ Array<Relation>
-
#initialize(database_url) ⇒ Reflector
constructor
A new instance of Reflector.
Constructor Details
#initialize(database_url) ⇒ Reflector
Returns a new instance of Reflector.
11 12 13 |
# File 'lib/dart/reflection/sequel_table/reflector.rb', line 11 def initialize(database_url) @db = ::Sequel.connect(database_url) end |
Instance Method Details
#get_relations_for_code_gen(options = {}) ⇒ Array<Relation>
20 21 22 23 24 25 |
# File 'lib/dart/reflection/sequel_table/reflector.rb', line 20 def get_relations_for_code_gen(={}) schema = get_schema() create_join_associations_for_codegen!(schema, ) schema.relations end |
#get_schema_for_resolver(options = {}) ⇒ Array<Relation>
32 33 34 35 36 |
# File 'lib/dart/reflection/sequel_table/reflector.rb', line 32 def get_schema_for_resolver(={}) schema = get_schema() create_join_associations_for_resolver!(schema, ) schema end |