Class: Dart::Reflection::SequelTable::Resolver::TheSchema
- Inherits:
-
Object
- Object
- Dart::Reflection::SequelTable::Resolver::TheSchema
- Includes:
- Singleton
- Defined in:
- lib/dart/reflection/sequel_table/resolver.rb
Instance Method Summary collapse
Instance Method Details
#relation_for(table_name) ⇒ Object
44 45 46 |
# File 'lib/dart/reflection/sequel_table/resolver.rb', line 44 def relation_for(table_name) schema[table_name] or raise "no relation for '#{table_name}' was found in the schema" end |
#schema ⇒ Object
48 49 50 51 52 53 54 |
# File 'lib/dart/reflection/sequel_table/resolver.rb', line 48 def schema # Dart::Reflection::SequelTable::Reflector.new('postgres://smcc@localhost:5432/iapps_development').get_associations(:groups, naming_conventions: true) # setting naming_conventions to true might cause simple ass names to become more complex @schema ||= begin # TODO Benchmark.realtime Reflector.new('postgres://smcc@localhost:5432/iapps_development').get_schema_for_resolver(exclude_tables: /migration/) end end |