Skip to content
代码片段 群组 项目
  • Heinrich Lee Yu's avatar
    ec4a0b45
    Support `#last` on relations with keyset order · ec4a0b45
    Heinrich Lee Yu 创作于
    When a relation has a complex order clause, ActiveRecord cannot reverse
    it automatically. But when the order clause is built using
    Gitlab::Pagination::Keyset::Order, we can determine the reverse order
    because we pass it in explicitly in these cases.
    
    This patch allows ActiveRecord to use the specified reverse order when
    calling `#last` and other related methods that need a reverse order.
    ec4a0b45
    历史
    Support `#last` on relations with keyset order
    Heinrich Lee Yu 创作于
    When a relation has a complex order clause, ActiveRecord cannot reverse
    it automatically. But when the order clause is built using
    Gitlab::Pagination::Keyset::Order, we can determine the reverse order
    because we pass it in explicitly in these cases.
    
    This patch allows ActiveRecord to use the specified reverse order when
    calling `#last` and other related methods that need a reverse order.
代码所有者
将用户和群组指定为特定文件更改的核准人。 了解更多。
active_record_keyset_pagination.rb 1.34 KiB