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 _REL_UPDATES_H_ |
10 | #define _REL_UPDATES_H_ |
11 | |
12 | #include "sql_list.h" |
13 | #include "sql_symbol.h" |
14 | #include "sql_mvc.h" |
15 | #include "sql_relation.h" |
16 | #include "sql_query.h" |
17 | |
18 | extern sql_rel *rel_update(mvc *sql, sql_rel *t, sql_rel *uprel, sql_exp **updates, list *exps); |
19 | |
20 | extern sql_rel *rel_insert(mvc *sql, sql_rel *t, sql_rel *inserts); |
21 | extern sql_rel *rel_delete(sql_allocator *sa, sql_rel *t, sql_rel *deletes); |
22 | extern sql_rel *rel_truncate(sql_allocator *sa, sql_rel *t, int drop_action, int check_identity); |
23 | |
24 | extern sql_exp * rel_parse_val(mvc *m, char *query, char emode, sql_rel *from); |
25 | |
26 | extern sql_rel *rel_updates(sql_query *query, symbol *sym); |
27 | |
28 | extern sql_table *insert_allowed(mvc *sql, sql_table *t, char *tname, char *op, char *opname); |
29 | extern sql_table *update_allowed(mvc *sql, sql_table *t, char *tname, char *op, char *opname, int is_delete); |
30 | |
31 | #endif /*_REL_UPDATES_H_*/ |
32 | |