MobilityDB  1.0
tbool_boolops.h
Go to the documentation of this file.
1 /*****************************************************************************
2  *
3  * This MobilityDB code is provided under The PostgreSQL License.
4  *
5  * Copyright (c) 2016-2021, Université libre de Bruxelles and MobilityDB
6  * contributors
7  *
8  * MobilityDB includes portions of PostGIS version 3 source code released
9  * under the GNU General Public License (GPLv2 or later).
10  * Copyright (c) 2001-2021, PostGIS contributors
11  *
12  * Permission to use, copy, modify, and distribute this software and its
13  * documentation for any purpose, without fee, and without a written
14  * agreement is hereby granted, provided that the above copyright notice and
15  * this paragraph and the following two paragraphs appear in all copies.
16  *
17  * IN NO EVENT SHALL UNIVERSITE LIBRE DE BRUXELLES BE LIABLE TO ANY PARTY FOR
18  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
19  * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION,
20  * EVEN IF UNIVERSITE LIBRE DE BRUXELLES HAS BEEN ADVISED OF THE POSSIBILITY
21  * OF SUCH DAMAGE.
22  *
23  * UNIVERSITE LIBRE DE BRUXELLES SPECIFICALLY DISCLAIMS ANY WARRANTIES,
24  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
25  * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON
26  * AN "AS IS" BASIS, AND UNIVERSITE LIBRE DE BRUXELLES HAS NO OBLIGATIONS TO
27  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 
28  *
29  *****************************************************************************/
30 
36 #ifndef __TBOOL_BOOLOPS_H__
37 #define __TBOOL_BOOLOPS_H__
38 
39 #include <postgres.h>
40 #include <fmgr.h>
41 #include <catalog/pg_type.h>
42 
43 #include "temporal.h"
44 
45 /*****************************************************************************/
46 
47 extern Datum datum_and(Datum l, Datum r);
48 extern Datum datum_or(Datum l, Datum r);
49 
50 extern Datum tand_bool_tbool(PG_FUNCTION_ARGS);
51 extern Datum tand_tbool_bool(PG_FUNCTION_ARGS);
52 extern Datum tand_tbool_tbool(PG_FUNCTION_ARGS);
53 
54 extern Datum tor_bool_tbool(PG_FUNCTION_ARGS);
55 extern Datum tor_tbool_bool(PG_FUNCTION_ARGS);
56 extern Datum tor_tbool_tbool(PG_FUNCTION_ARGS);
57 
58 extern Datum tnot_tbool(PG_FUNCTION_ARGS);
59 
60 extern Temporal *boolop_tbool_tbool(const Temporal *temp1, const Temporal *temp2, datum_func2 func);
61 extern Temporal *tnot_tbool_internal(const Temporal *temp);
62 
63 /*****************************************************************************/
64 
65 #endif
Datum datum_and(Datum l, Datum r)
Returns the Boolean and of the two values.
Definition: tbool_boolops.c:49
Datum tnot_tbool(PG_FUNCTION_ARGS)
Returns the temporal boolean not of the temporal value.
Definition: tbool_boolops.c:290
Structure to represent the common structure of temporal values of any temporal subtype.
Definition: temporal.h:241
Datum tand_tbool_bool(PG_FUNCTION_ARGS)
Returns the temporal boolean and of the temporal value and the value.
Definition: tbool_boolops.c:121
Datum tor_tbool_tbool(PG_FUNCTION_ARGS)
Returns the temporal boolean or of the temporal values.
Definition: tbool_boolops.c:184
Temporal * tnot_tbool_internal(const Temporal *temp)
Returns the temporal boolean not of the temporal value (dispatch function)
Definition: tbool_boolops.c:270
Temporal * boolop_tbool_tbool(const Temporal *temp1, const Temporal *temp2, datum_func2 func)
Definition: tbool_boolops.c:83
Datum datum_or(Datum l, Datum r)
Returns the Boolean or of the two values.
Definition: tbool_boolops.c:59
Basic functions for temporal types of any subtype.
Datum tor_tbool_bool(PG_FUNCTION_ARGS)
Returns the temporal boolean or of the temporal value and the value.
Definition: tbool_boolops.c:170
Datum(* datum_func2)(Datum, Datum)
Definition: temporal.h:358
Datum tand_bool_tbool(PG_FUNCTION_ARGS)
Returns the temporal boolean and of the value and the temporal value.
Definition: tbool_boolops.c:107
Datum tor_bool_tbool(PG_FUNCTION_ARGS)
Returns the temporal boolean or of the value and the temporal value.
Definition: tbool_boolops.c:156
Datum tand_tbool_tbool(PG_FUNCTION_ARGS)
Returns the temporal boolean and of the temporal values.
Definition: tbool_boolops.c:135