/usr/lib/ruby/vendor_ruby/sequel/plugins/unlimited_update.rb is in ruby-sequel 4.1.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | module Sequel
module Plugins
# The unlimited_update plugin is designed to work around a
# MySQL warning in replicated environments, which occurs if
# you issue an UPDATE with a LIMIT clause. No other
# database Sequel supports will create an UPDATE clause with
# a LIMIT, and in non-replicated MySQL environments, MySQL
# doesn't issue a warning. Note that even in replicated
# environments the MySQL warning is harmless, as Sequel
# restricts an update to rows with a matching primary key,
# which should be unique.
#
# Usage:
#
# # Make all model subclass not use a limit for update
# Sequel::Model.plugin :unlimited_update
#
# # Make the Album class not use a limit for update
# Album.plugin :unlimited_update
module UnlimitedUpdate
module InstanceMethods
private
# Use an unlimited dataset for updates.
def _update_dataset
super.unlimited
end
end
end
end
end
|