1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//! Pluggable stored-procedure support (`CALL proc(...) YIELD ...`).
//!
//! MarsDB itself ships no built-in procedures -- this only defines the
//! interface an embedder (or a test harness, see `marsdb-tck`) implements
//! to make `CALL` resolve to something real. `Executor` never invents
//! procedure behavior on its own; every `CALL` fails with "procedure not
//! found" unless a provider is supplied via `ExecutionOptions::procedures`.
use Arc;
use crateQueryError;
use crateValue;
/// A procedure's declared shape -- everything `Executor` needs to validate
/// a `CALL` at the point it's about to run (arity, coarse argument-type
/// compatibility, output column names for `YIELD`), before ever asking
/// `ProcedureProvider::call` to actually produce rows.
/// Implemented by whatever embeds MarsDB to make `CALL` resolve to real
/// behavior. `Executor` calls `signature` once per `CALL` (for compile-
/// time-shaped validation) and `call` once per input row (standalone: once
/// total, since there's no input row to iterate).
/// `Arc<dyn ProcedureProvider>` wrapper -- same "manual `Debug`, derived
/// `Clone`" shape `executor::ExecutionObserver` already uses for its own
/// `Arc<dyn Fn(..)>`, so `ExecutionOptions` (which embeds this) can keep
/// deriving both.
;