Line data Source code
1 : #ifndef BIGQUERY_EMULATOR_BACKEND_CATALOG_STORED_PROCEDURE_H_
2 : #define BIGQUERY_EMULATOR_BACKEND_CATALOG_STORED_PROCEDURE_H_
3 :
4 : #include <string>
5 : #include <vector>
6 :
7 : #include "googlesql/public/function_signature.h"
8 : #include "googlesql/public/procedure.h"
9 :
10 : namespace bigquery_emulator {
11 : namespace backend {
12 : namespace catalog {
13 :
14 : // In-memory SQL procedure registered via CREATE PROCEDURE. The
15 : // analyzer needs a `googlesql::Procedure` for CALL resolution; body
16 : // execution is handled by the semantic script driver.
17 : class StoredSQLProcedure : public ::googlesql::Procedure {
18 : public:
19 : StoredSQLProcedure(std::vector<std::string> name_path,
20 : ::googlesql::FunctionSignature signature,
21 : std::vector<std::string> argument_name_list,
22 : std::string procedure_body);
23 :
24 0 : const std::string& procedure_body() const {
25 0 : return procedure_body_;
26 0 : }
27 0 : const std::vector<std::string>& argument_name_list() const {
28 0 : return argument_name_list_;
29 0 : }
30 :
31 : private:
32 : std::vector<std::string> argument_name_list_{};
33 : std::string procedure_body_{};
34 : };
35 :
36 : } // namespace catalog
37 : } // namespace backend
38 : } // namespace bigquery_emulator
39 :
40 : #endif // BIGQUERY_EMULATOR_BACKEND_CATALOG_STORED_PROCEDURE_H_
|