Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Fish0 0.2.2 (May, 06, 2024) ##

* Added `hint` argument to `Fish0::Repository` in order to force usage of specific index(-es).

## Fish0 0.2.1 (May, 11, 2023) ##

* Update required Ruby version from `~>2.0` to `>=2.0`.
Expand Down
6 changes: 6 additions & 0 deletions lib/fish0/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ def skip(value)
self
end

def hint(value)
@hint = value
self
end

def scope(name, body)
return if respond_to?(name)

Expand All @@ -105,6 +110,7 @@ def fetch
scoped = scoped.projection(@projection) if @projection
scoped = scoped.skip(skip_quantity) if skip_quantity.positive?
scoped = scoped.limit(limit_quantity) if limit_quantity.positive?
scoped = scoped.hint(@hint) if @hint
scoped
end

Expand Down
2 changes: 1 addition & 1 deletion lib/fish0/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Fish0
VERSION = '0.2.1'.freeze
VERSION = '0.2.2'.freeze
end