| 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 | #include "monetdb_config.h" |
| 10 | #include "sql.h" |
| 11 | #include "sql_result.h" |
| 12 | #include "sql_gencode.h" |
| 13 | #include "sql_storage.h" |
| 14 | #include "sql_scenario.h" |
| 15 | #include "store_sequence.h" |
| 16 | #include "sql_datetime.h" |
| 17 | #include "rel_optimizer.h" |
| 18 | #include "rel_distribute.h" |
| 19 | #include "rel_select.h" |
| 20 | #include "rel_exp.h" |
| 21 | #include "rel_dump.h" |
| 22 | #include "clients.h" |
| 23 | #include "mal_instruction.h" |
| 24 | |
| 25 | #define CONCAT_2(a, b) a##b |
| 26 | #define CONCAT_3(a, b, c) a##b##c |
| 27 | |
| 28 | #define NIL(t) CONCAT_2(t, _nil) |
| 29 | #define ISNIL(t) CONCAT_3(is_, t, _nil) |
| 30 | #define TPE(t) CONCAT_2(TYPE_, t) |
| 31 | #define GDKmin(t) CONCAT_3(GDK_, t, _min) |
| 32 | #define GDKmax(t) CONCAT_3(GDK_, t, _max) |
| 33 | #define FUN(a, b) CONCAT_3(a, _, b) |
| 34 | |
| 35 | #define STRING(a) #a |
| 36 | |
| 37 | #define BIG lng /* a larger type */ |
| 38 | |
| 39 | #define TYPE bte |
| 40 | #include "sql_round_impl.h" |
| 41 | #undef TYPE |
| 42 | |
| 43 | #define TYPE sht |
| 44 | #include "sql_round_impl.h" |
| 45 | #undef TYPE |
| 46 | |
| 47 | #define TYPE int |
| 48 | #include "sql_round_impl.h" |
| 49 | #undef TYPE |
| 50 | |
| 51 | #define TYPE lng |
| 52 | #include "sql_round_impl.h" |
| 53 | #undef TYPE |
| 54 | |
| 55 | #ifdef HAVE_HGE |
| 56 | #undef BIG |
| 57 | #define BIG hge |
| 58 | #define TYPE hge |
| 59 | #include "sql_round_impl.h" |
| 60 | #undef TYPE |
| 61 | #endif |
| 62 | |