1/*
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 *
6 * Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V.
7 */
8
9#ifndef _SQL_SUBQUERY_H
10#define _SQL_SUBQUERY_H
11
12#include "sql.h"
13
14sql5_export str zero_or_one_error(ptr ret, const bat *bid, const bit *err );
15sql5_export str zero_or_one_error_bat(ptr ret, const bat *bid, const bat *err );
16sql5_export str zero_or_one(ptr ret, const bat *bid);
17sql5_export str SQLsubzero_or_one(bat *ret, const bat *b, const bat *gp, const bat *gpe, bit *no_nil);
18sql5_export str SQLall(ptr ret, const bat *bid);
19sql5_export str SQLall_grp(bat *ret, const bat *l, const bat *gp, const bat *gpe, bit *no_nil);
20sql5_export str SQLnil(bit *ret, const bat *bid);
21sql5_export str SQLnil_grp(bat *ret, const bat *l, const bat *gp, const bat *gpe, bit *no_nil);
22sql5_export str SQLany_cmp(bit *ret, const bit *cmp, const bit *nl, const bit *nr);
23sql5_export str SQLall_cmp(bit *ret, const bit *cmp, const bit *nl, const bit *nr);
24sql5_export str SQLanyequal(bit *ret, const bat *l, const bat *r);
25sql5_export str SQLanyequal_grp(bat *ret, const bat *l, const bat *r, const bat *gp, const bat *gpe, bit *no_nil);
26sql5_export str SQLanyequal_grp2(bat *ret, const bat *l, const bat *r, const bat *rid, const bat *gp, const bat *gpe, bit *no_nil);
27sql5_export str SQLallnotequal(bit *ret, const bat *l, const bat *r);
28sql5_export str SQLallnotequal_grp(bat *ret, const bat *l, const bat *r, const bat *gp, const bat *gpe, bit *no_nil);
29sql5_export str SQLallnotequal_grp2(bat *ret, const bat *l, const bat *r, const bat *rid, const bat *gp, const bat *gpe, bit *no_nil);
30
31sql5_export str SQLexist(bit *res, bat *id);
32sql5_export str SQLexist_val(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
33sql5_export str SQLsubexist(bat *ret, const bat *b, const bat *gp, const bat *gpe, bit *no_nil);
34
35sql5_export str SQLnot_exist(bit *res, bat *id);
36sql5_export str SQLnot_exist_val(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
37sql5_export str SQLsubnot_exist(bat *ret, const bat *b, const bat *gp, const bat *gpe, bit *no_nil);
38
39#endif /* _SQL_SUBQUERY_H */
40