class Sequel::Model::Associations::OneToOneAssociationReflection
Public Instance Methods
eager_limit_strategy()
click to toggle source
one_to_one associations don't use an eager limit strategy by default, but support both DISTINCT ON and window functions as strategies.
# File lib/sequel/model/associations.rb, line 498 def eager_limit_strategy cached_fetch(:_eager_limit_strategy) do case s = self[:eager_limit_strategy] when Symbol s when true ds = associated_class.dataset if ds.supports_ordered_distinct_on? :distinct_on elsif ds.supports_window_functions? :window_function end else nil end end end
limit_and_offset()
click to toggle source
The limit and offset for this association (returned as a two element array).
# File lib/sequel/model/associations.rb, line 517 def limit_and_offset [1, nil] end
returns_array?()
click to toggle source
one_to_one associations return a single object, not an array
# File lib/sequel/model/associations.rb, line 522 def returns_array? false end