questioning_authority icon indicating copy to clipboard operation
questioning_authority copied to clipboard

don't limit `TableBasedAuthority#all`

Open no-reply opened this issue 5 years ago • 1 comments

authorities with more than 1000 entries have erratic behavior due to

https://github.com/samvera/questioning_authority/blob/2271be61d1a80abb324e835178f9d54acceee501/lib/qa/authorities/local/table_based_authority.rb#L47

it seems like it would be good enough to just remove the limit.

no-reply avatar Jun 17 '20 22:06 no-reply

Rather than remove the limit, I would be inclined to make it configurable. If the configured limit is nil, that can be used to effectively remove the limit.

Change to something like...

    def all
      Qa.config.tablebased_all_limit&.positive? ? output_set(base_relation.limit(1000)) : output_set(base_relation)
    end

The config would default to 1000 to maintain backward compatibility.

elrayle avatar Jan 12 '21 14:01 elrayle