/Users/deen/code/yugabyte-db/src/yb/common/ql_bfunc.cc
Line | Count | Source (jump to first uncovered line) |
1 | | // Copyright (c) YugaByte, Inc. |
2 | | // |
3 | | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except |
4 | | // in compliance with the License. You may obtain a copy of the License at |
5 | | // |
6 | | // http://www.apache.org/licenses/LICENSE-2.0 |
7 | | // |
8 | | // Unless required by applicable law or agreed to in writing, software distributed under the License |
9 | | // is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express |
10 | | // or implied. See the License for the specific language governing permissions and limitations |
11 | | // under the License. |
12 | | // |
13 | | |
14 | | #include "yb/common/ql_bfunc.h" |
15 | | |
16 | | #include "yb/bfpg/bfpg.h" |
17 | | |
18 | | #include "yb/bfql/bfql.h" |
19 | | |
20 | | #include "yb/common/ql_value.h" |
21 | | |
22 | | namespace yb { |
23 | | |
24 | | using std::shared_ptr; |
25 | | using std::vector; |
26 | | |
27 | | //-------------------------------------------------------------------------------------------------- |
28 | | // CQL support |
29 | | |
30 | | using QLBfuncExecApi = yb::bfql::BFExecApi<QLValue, QLValue>; |
31 | | |
32 | | Status QLBfunc::Exec(bfql::BFOpcode opcode, |
33 | | const vector<shared_ptr<QLValue>>& params, |
34 | 0 | const shared_ptr<QLValue>& result) { |
35 | 0 | return QLBfuncExecApi::ExecQLOpcode(opcode, params, result); |
36 | 0 | } |
37 | | |
38 | | Status QLBfunc::Exec(bfql::BFOpcode opcode, |
39 | | const vector<QLValue*>& params, |
40 | 0 | QLValue *result) { |
41 | 0 | return QLBfuncExecApi::ExecQLOpcode(opcode, params, result); |
42 | 0 | } |
43 | | |
44 | | Status QLBfunc::Exec(bfql::BFOpcode opcode, |
45 | | vector<QLValue> *params, |
46 | 724 | QLValue *result) { |
47 | 724 | return QLBfuncExecApi::ExecQLOpcode(opcode, params, result); |
48 | 724 | } |
49 | | |
50 | | //-------------------------------------------------------------------------------------------------- |
51 | | // PGSQL support |
52 | | |
53 | | using PgsqlBfuncExecApi = yb::bfpg::BFExecApi<QLValue, QLValue>; |
54 | | |
55 | | Status PgsqlBfunc::Exec(bfpg::BFOpcode opcode, |
56 | | const vector<shared_ptr<QLValue>>& params, |
57 | 0 | const shared_ptr<QLValue>& result) { |
58 | 0 | return PgsqlBfuncExecApi::ExecPgsqlOpcode(opcode, params, result); |
59 | 0 | } |
60 | | |
61 | | Status PgsqlBfunc::Exec(bfpg::BFOpcode opcode, |
62 | | const vector<QLValue*>& params, |
63 | 0 | QLValue *result) { |
64 | 0 | return PgsqlBfuncExecApi::ExecPgsqlOpcode(opcode, params, result); |
65 | 0 | } |
66 | | |
67 | | Status PgsqlBfunc::Exec(bfpg::BFOpcode opcode, |
68 | | vector<QLValue> *params, |
69 | 0 | QLValue *result) { |
70 | 0 | return PgsqlBfuncExecApi::ExecPgsqlOpcode(opcode, params, result); |
71 | 0 | } |
72 | | |
73 | | } // namespace yb |