Module: Praxis::Mapper::SequelCompat::ClassMethods
- Defined in:
- lib/praxis/mapper/sequel_compat.rb
Instance Method Summary collapse
- #_field_selector_query_builder_class ⇒ Object
- #_filter_query_builder_class ⇒ Object
- #_pagination_query_builder_class ⇒ Object
- #_praxis_associations ⇒ Object
Instance Method Details
#_field_selector_query_builder_class ⇒ Object
24 25 26 |
# File 'lib/praxis/mapper/sequel_compat.rb', line 24 def _field_selector_query_builder_class Praxis::Extensions::FieldSelection::SequelQuerySelector end |
#_filter_query_builder_class ⇒ Object
19 20 21 22 |
# File 'lib/praxis/mapper/sequel_compat.rb', line 19 def _filter_query_builder_class # TODO: refactor the query builder, and add the explicit require in this file Praxis::Extensions::SequelFilterQueryBuilder end |
#_pagination_query_builder_class ⇒ Object
28 29 30 |
# File 'lib/praxis/mapper/sequel_compat.rb', line 28 def _pagination_query_builder_class Praxis::Extensions::Pagination::SequelPaginationHandler end |
#_praxis_associations ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/praxis/mapper/sequel_compat.rb', line 32 def _praxis_associations orig = association_reflections.clone orig.each do |_k, v| v[:model] = v.associated_class v[:local_key_columns] = local_columns_used_for_the_association(v[:type], v) v[:remote_key_columns] = remote_columns_used_for_the_association(v[:type], v) v[:primary_key] = if v.respond_to?(:primary_key) v.primary_key else # FIXME: figure out exactly what to do here. # not super critical, as we can't track these associations # directly, but it would be nice to traverse these # properly. :unsupported end end orig end |