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 | /* |
10 | * (c) Martin Kersten |
11 | * The factory infrastructure can be inspected and steered with |
12 | * the commands provided here. to-be-completed-when-needed |
13 | */ |
14 | #include "monetdb_config.h" |
15 | #include "factories.h" |
16 | |
17 | str |
18 | FCTgetPlants(bat *ret, bat *ret2) |
19 | { |
20 | (void) ret; |
21 | (void) ret2; |
22 | throw(MAL, "factories.getPlants" , SQLSTATE(0A000) PROGRAM_NYI); |
23 | } |
24 | |
25 | str |
26 | FCTgetCaller(int *ret) |
27 | { |
28 | (void) ret; |
29 | throw(MAL, "factories.getCaller" , SQLSTATE(0A000) PROGRAM_NYI); |
30 | } |
31 | |
32 | str |
33 | FCTgetOwners(bat *ret) |
34 | { |
35 | (void) ret; |
36 | throw(MAL, "factories.getOwner" , SQLSTATE(0A000) PROGRAM_NYI); |
37 | } |
38 | |
39 | str |
40 | FCTgetArrival(bat *ret) |
41 | { |
42 | (void) ret; |
43 | throw(MAL, "factories.getArrival" , SQLSTATE(0A000) PROGRAM_NYI); |
44 | } |
45 | |
46 | str |
47 | FCTgetDeparture(bat *ret) |
48 | { |
49 | (void) ret; |
50 | throw(MAL, "factories.getDeparture" , SQLSTATE(0A000) PROGRAM_NYI); |
51 | } |
52 | |
53 | str |
54 | FCTshutdown(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci) |
55 | { |
56 | str mod = *getArgReference_str(stk, pci, 1); |
57 | str fcn = *getArgReference_str(stk, pci, 2); |
58 | Symbol s; |
59 | (void) mb; |
60 | |
61 | s = findSymbol(cntxt->usermodule, putName(mod), putName(fcn)); |
62 | if (s == NULL) |
63 | throw(MAL, "factories.shutdown" , SQLSTATE(HY002) RUNTIME_OBJECT_MISSING); |
64 | shutdownFactory(cntxt,s->def); |
65 | return MAL_SUCCEED; |
66 | } |
67 | |