Project

General

Profile

« Previous | Next » 

Revision 11578

lib/sh/db.sh: limit(): also support using $n as the limit param, since this var name is used by other parts of the import process

View differences:

lib/sh/db.sh
35 35
alias set_large_table='declare del="${del-$(test "$limit"; exit2bool)}"
36 36
echo_vars del'
37 37

  
38
limit() # usage: "query... $([prefix=$'| |\n'] [limit=#] limit)"
38
limit() # usage: "query... $([prefix=$'| |\n'] [limit|n=#] limit)"
39 39
{
40 40
	echo_func; kw_params prefix; local prefix="${prefix-
41 41
}"
42
	if isset n; then local limit="${limit-$n}"; fi
42 43
	echo -n "${limit:+${prefix}LIMIT $limit}"
43 44
}
44 45

  

Also available in: Unified diff