Leaguepedia | League of Legends Esports Wiki
Leaguepedia | League of Legends Esports Wiki

To edit the documentation or categories for this module, click here.

local util_args = require("Module:ArgsUtil")
local util_cargo = require("Module:CargoUtil")
local util_table = require("Module:TableUtil")

local PBHQ = require('Module:PickBanHistoryQueryAbstract'):extends()

PBHQ.FORM_INFO = { form = 'PickBanHistory', template = 'PBH' }

function PBHQ:getWhere()
	local where = self:super('getWhere')
	local team = self.args.team:get()
	local tbl = {
		util_cargo.whereFromArg('PB.N_Page >= "%s"', self.args.pagestart),
		util_cargo.whereFromArg('PB.N_Page <= "%s"', self.args.pageend),
		team and ('(PB.Team1="%s" OR PB.Team2="%s")'):format(team, team)
	util_table.mergeArrays(where, tbl)
	return where

return PBHQ