Grouping function either groups the whole result or the result specified
by group by
.
Counts occurrences within a group.
Calculates the average of all num
within a group.
Calculates the sum of all num
within a group.
Calculates the minimum of all num
within a group.
Calculates the maximum of all num
within a group.
Calculates the standard deviation of all num
within a group.
Converts double precision number to integer.
Evaluates condition
and executes false_op
if the result is 0 (false)
otherwise true_op
is executed.
Masks the specified address using the v4 and v6 mask lengths specified in number of bits.
Defaults to 24 for IPv4 and 48 for IPv6 (/24 and /48 respectively)
Returns the 2-letter ISO country code associated with the address from a MaxMind database (see MaxMind Database below on selecting database).
Returns an empty string on lookup failures or if this feature was not built in.
Returns the autonomous system number associated with the address from a MaxMind database (see MaxMind Database below on selecting database).
Returns -1 on lookup failures or if this feature was not built in.
Splits a string on character char
(default .
) and selects the N'th split
from the right, i.e: RSPLIT('192.168.0.1',2)
returns 168.
Translate numbers into names table can be rcode
or qtype
, i.e:
name('rcode',rcode)
returns NXDomain
.
Trims of any occurrences of the string trim
from both end of the string,
i.e: trim('se.domains.se', 'se')
returns .domains.
.
Turns string
into lowercase.
PacketQ will try to open MaxMind databases that resides in common path on major distributions, but you can also specify paths and database files using environment variables.
PACKETQ_MAXMIND_PATH
sets the path to look for the databases in addition
to the common paths, it will try GeoLite2-Country.mmdb
for CC()
and
GeoLite2-ASN.mmdb
for ASN()
.
You can also specify the full path to the database file you wish to use
for each function with PACKETQ_MAXMIND_CC_DB
and PACKETQ_MAXMIND_ASN_DB
,
these settings will override path settings.