| 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 _SQL2MAL_H |
| 10 | #define _SQL2MAL_H |
| 11 | |
| 12 | #include "sql.h" |
| 13 | #include "mal_backend.h" |
| 14 | #include "sql_atom.h" |
| 15 | #include "sql_statement.h" |
| 16 | #include "sql_env.h" |
| 17 | #include "sql_mvc.h" |
| 18 | #include "mal_function.h" |
| 19 | |
| 20 | sql5_export Symbol backend_dumpproc(backend *be, Client c, cq *q, sql_rel *r); |
| 21 | sql5_export int backend_callinline(backend *be, Client c); |
| 22 | sql5_export int backend_dumpstmt(backend *be, MalBlkPtr mb, sql_rel *r, int top, int addend, const char *query); |
| 23 | sql5_export void backend_call(backend *be, Client c, cq *q); |
| 24 | sql5_export int monet5_resolve_function(ptr M, sql_func *f); |
| 25 | sql5_export int backend_create_func(backend *be, sql_func *f, list *restypes, list *ops); |
| 26 | extern int backend_create_subfunc(backend *be, sql_subfunc *f, list *ops); |
| 27 | extern int backend_create_subaggr(backend *be, sql_subaggr *f); |
| 28 | |
| 29 | sql5_export int monet5_create_relational_function(mvc *m, const char *mod, const char *name, sql_rel *rel, stmt *call, list *rel_ops, int inline_func); |
| 30 | |
| 31 | extern void rel_print(mvc *sql, sql_rel *rel, int depth); |
| 32 | extern void _rel_print(mvc *sql, sql_rel *rel); |
| 33 | |
| 34 | extern int constantAtom(backend *be, MalBlkPtr mb, atom *a); |
| 35 | extern InstrPtr table_func_create_result(MalBlkPtr mb, InstrPtr q, sql_func *f, list *restypes); |
| 36 | extern InstrPtr relational_func_create_result(mvc *sql, MalBlkPtr mb, InstrPtr q, sql_rel *f); |
| 37 | |
| 38 | #endif /* _SQL2MAL_H */ |
| 39 | |