CUBRID Engine  latest
jsp_cl.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008 Search Solution Corporation
3  * Copyright 2016 CUBRID Corporation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 
20 /*
21  * jsp_cl.h - Java Stored Procedure Client Module Header
22  *
23  * Note:
24  */
25 
26 #ifndef _JSP_CL_H_
27 #define _JSP_CL_H_
28 
29 #ident "$Id$"
30 
31 #if defined (SERVER_MODE)
32 #error Does not belong to server module.
33 #endif /* SERVER_MODE */
34 
35 #include "parse_tree.h"
36 
37 #define SP_CLASS_NAME "_db_stored_procedure"
38 #define SP_ARG_CLASS_NAME "_db_stored_procedure_args"
39 
40 #define SP_ATTR_NAME "sp_name"
41 #define SP_ATTR_SP_TYPE "sp_type"
42 #define SP_ATTR_RETURN_TYPE "return_type"
43 #define SP_ATTR_ARGS "args"
44 #define SP_ATTR_ARG_COUNT "arg_count"
45 #define SP_ATTR_LANG "lang"
46 #define SP_ATTR_TARGET "target"
47 #define SP_ATTR_OWNER "owner"
48 #define SP_ATTR_COMMENT "comment"
49 
50 #define SP_ATTR_ARG_NAME "arg_name"
51 #define SP_ATTR_INDEX_OF_NAME "index_of"
52 #define SP_ATTR_DATA_TYPE "data_type"
53 #define SP_ATTR_MODE "mode"
54 #define SP_ATTR_ARG_COMMENT "comment"
55 
56 typedef enum
57 {
60 } SP_TYPE_ENUM;
61 
62 typedef enum
63 {
67 } SP_MODE_ENUM;
68 
69 typedef enum
70 {
72 } SP_LANG_ENUM;
73 
74 extern int jsp_create_stored_procedure (PARSER_CONTEXT * parser, PT_NODE * statement);
75 extern int jsp_alter_stored_procedure (PARSER_CONTEXT * parser, PT_NODE * statement);
76 extern int jsp_drop_stored_procedure (PARSER_CONTEXT * parser, PT_NODE * statement);
77 extern int jsp_call_stored_procedure (PARSER_CONTEXT * parser, PT_NODE * statement);
78 
79 extern int jsp_is_exist_stored_procedure (const char *name);
80 extern int jsp_get_return_type (const char *name);
81 extern void jsp_init (void);
82 extern void jsp_close_connection (void);
83 extern MOP jsp_find_stored_procedure (const char *name);
84 
85 extern void jsp_set_prepare_call (void);
86 extern void jsp_unset_prepare_call (void);
87 extern int jsp_call_from_server (DB_VALUE * returnval, DB_VALUE ** argarray, const char *name, const int arg_cnt);
88 
89 extern void *jsp_get_db_result_set (int h_id);
90 extern void jsp_srv_handle_free (int h_id);
91 
92 extern int jsp_send_destroy_request_all ();
93 extern int jsp_send_destroy_request (const SOCKET sockfd);
94 
95 #endif /* _JSP_CL_H_ */
int jsp_get_return_type(const char *name)
Definition: jsp_cl.c:287
void jsp_unset_prepare_call(void)
Definition: jsp_cl.c:3061
int jsp_create_stored_procedure(PARSER_CONTEXT *parser, PT_NODE *statement)
Definition: jsp_cl.c:500
int SOCKET
Definition: porting.h:482
void * jsp_get_db_result_set(int h_id)
Definition: jsp_cl.c:3075
int jsp_call_from_server(DB_VALUE *returnval, DB_VALUE **argarray, const char *name, const int arg_cnt)
Definition: jsp_cl.c:2999
SP_LANG_ENUM
Definition: jsp_cl.h:69
int jsp_alter_stored_procedure(PARSER_CONTEXT *parser, PT_NODE *statement)
Definition: jsp_cl.c:598
int jsp_drop_stored_procedure(PARSER_CONTEXT *parser, PT_NODE *statement)
Definition: jsp_cl.c:451
void jsp_init(void)
Definition: jsp_cl.c:185
int jsp_is_exist_stored_procedure(const char *name)
Definition: jsp_cl.c:267
SP_MODE_ENUM
Definition: jsp_cl.h:62
SP_PARSER_CTX * parser
MOP jsp_find_stored_procedure(const char *name)
Definition: jsp_cl.c:227
void jsp_close_connection(void)
Definition: jsp_cl.c:209
int jsp_send_destroy_request(const SOCKET sockfd)
Definition: jsp_cl.c:1979
void jsp_srv_handle_free(int h_id)
Definition: jsp_cl.c:3089
int jsp_call_stored_procedure(PARSER_CONTEXT *parser, PT_NODE *statement)
Definition: jsp_cl.c:326
void jsp_set_prepare_call(void)
Definition: jsp_cl.c:3048
SP_TYPE_ENUM
Definition: jsp_cl.h:56
int jsp_send_destroy_request_all()
Definition: jsp_cl.c:1963