Home
Random
Log in
Settings
About the Deadlock Wiki
Search
Editing
Module
:
BucketCount
Give feedback
Warning:
You are not logged in. Once you make an edit, a temporary account will be created for you.
Learn more
.
Log in
or
create an account
to continue receiving notifications after this account expires, and to access other features.
Anti-spam check. Do
not
fill this in!
local p = {} function p.main(frame) local args = frame:getParent().args local bucket_name = mw.text.trim(args[1] or '') local select_field = mw.text.trim(args[2] or '') local count = 0 while(true) do local b = bucket(bucket_name).select(select_field).limit(5000).offset(count) for k, v in pairs(args) do if k ~= 1 and k ~= 2 then -- https://runescape.wiki/w/Module:BucketCount?action=edit -- creds to these geezers v = mw.text.decode(v) -- {{PAGENAME}} will urlencode apostrophe, so we have to undo it if string.sub(k, 1, 1) == '!' then k = string.sub(k, 2, #k) b.where(bucket.Not({k, v})) else b.where(k, v) end end end local data = b.run() count = count + #data if #data < 5000 then return count end end end return p
Summary:
Please note that all contributions to The Deadlock Wiki are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
Deadlock:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Preview page with this template
Page included on this page:
Module:BucketCount/doc
(
view source
)