We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
version
Why don't we add an index to the version column and modify the TaskRecord.completed_task? method as shown below, to make it more efficient?
TaskRecord.completed_task?
from:
def self.completed_task?(version) all.any?{|t| t.version == version} end
to:
def self.completed_task?(version) exists?(version: version) end
This is way more efficient when you use it for a while and have lots of tasks there.
BTW, the uniqueness of version field should be enforced.
The text was updated successfully, but these errors were encountered:
@UniIsland Sorry for the super delayed response. These are really great ideas. I'll see about including this in the next update.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Why don't we add an index to the
version
column and modify theTaskRecord.completed_task?
method as shown below, to make it more efficient?from:
to:
This is way more efficient when you use it for a while and have lots of tasks there.
BTW, the uniqueness of
version
field should be enforced.The text was updated successfully, but these errors were encountered: