# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0.  If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.

module querylog;

command enable(threshold:int)
address QLOGenableThreshold
comment "Turn on the query logger";

command enable()
address QLOGenable
comment "Turn on the query logger";

command disable()
address QLOGdisable
comment "Turn off the query logger";

command isset():int
address QLOGissetFcn
comment "Return status of query logger";

command empty()
address QLOGempty
comment "Clear the query log tables";

pattern append(q:str, pipe:str, usr:str, tick:timestamp)
address QLOGappend
comment "Add a new query call to the query log";

command define(q:str, pipe:str, size:int)
address QLOGdefineNaive
comment "Noop operation, just marking the query";

pattern call(tick1:timestamp, tick2:timestamp, arg:str, tuples:lng, xtime:lng, rtime:lng, cpu:int, iowait:int)
address QLOGcall
comment "Add a new query call to the query log";
