CUBRID Engine
latest
Main Page
Namespaces
Classes
Files
File List
File Members
method_scan.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
* Public defines for value array scans
22
*/
23
24
#ifndef _METHOD_SCAN_H_
25
#define _METHOD_SCAN_H_
26
27
#ident "$Id$"
28
29
#if !defined (SERVER_MODE) && !defined (SA_MODE)
30
#error Belongs to server module
31
#endif
/* !defined (SERVER_MODE) && !defined (SA_MODE) */
32
33
#include "
dbtype_def.h
"
34
#include "
method_def.hpp
"
35
#ifndef SERVER_MODE
36
#include "
work_space.h
"
37
#include "
cursor.h
"
38
#endif
/* SERVER_MODE */
39
#include "
storage_common.h
"
40
#include "
thread_compat.hpp
"
41
42
// forward definitions
43
struct
qfile_list_id
;
44
struct
qproc_db_value_list
;
45
struct
method_sig_list
;
46
typedef
struct
method_sig_list
METHOD_SIG_LIST
;
47
struct
val_list_node
;
48
49
#ifdef SERVER_MODE
50
#define VACOMM_BUFFER_SIZE 4096
51
52
typedef
struct
vacomm_buffer
VACOMM_BUFFER
;
53
struct
vacomm_buffer
54
{
/* */
55
int
length;
/* trans length */
56
int
status;
/* trans status */
57
int
error
;
/* client error */
58
int
num_vals
;
/* number of values */
59
char
*
area
;
/* buffer + header */
60
char
*
buffer
;
/* buffer */
61
int
cur_pos
;
/* current position */
62
int
size
;
/* size of buffer */
63
int
action
;
/* client action */
64
};
65
#endif
66
67
#define MAX_XS_SCANBUF_DBVALS 256
68
69
typedef
struct
method_info
METHOD_INFO
;
70
struct
method_info
71
{
72
qfile_list_id
*
list_id
;
/* list id for arguments */
73
METHOD_SIG_LIST
*
method_sig_list
;
/* method signatures */
74
};
75
76
typedef
struct
method_scan_buffer
METHOD_SCAN_BUFFER
;
77
struct
method_scan_buffer
78
{
/* value array scanbuf */
79
qproc_db_value_list
*
dbval_list
;
/* ptrs into the value array */
80
union
81
{
/* ctl info based on type */
82
METHOD_INFO
method_ctl
;
83
} s;
84
#ifdef SERVER_MODE
85
VACOMM_BUFFER
*
vacomm_buffer
;
86
#else
/* SERVER_MODE */
87
/* These are needed for calling */
88
/* methods in standalone mode */
89
DB_VALUE
*
vallist
;
/* values from the input list file */
90
DB_VALUE
**
valptrs
;
/* ptrs to the above values */
91
int
*
oid_cols
;
/* OID columns in list file */
92
CURSOR_ID
crs_id
;
/* cursor id */
93
int
val_cnt
;
/* number of values in vallist */
94
#endif
/* SERVER_MODE */
95
};
96
97
extern
int
method_open_scan
(
THREAD_ENTRY
* thread_p,
METHOD_SCAN_BUFFER
* scan_buf,
qfile_list_id
* list_id,
98
method_sig_list
*
method_sig_list
);
99
extern
int
method_close_scan
(
THREAD_ENTRY
* thread_p,
METHOD_SCAN_BUFFER
* scan_buf);
100
extern
SCAN_CODE
method_scan_next
(
THREAD_ENTRY
* thread_p,
METHOD_SCAN_BUFFER
* scan_buf,
val_list_node
* val_list);
101
#endif
/* _METHOD_SCAN_H_ */
thread_compat.hpp
method_def.hpp
SCAN_CODE
SCAN_CODE
Definition:
storage_common.h:473
vacomm_buffer::action
int action
Definition:
query_method.h:47
method_scan_next
SCAN_CODE method_scan_next(THREAD_ENTRY *thread_p, METHOD_SCAN_BUFFER *scan_buf, val_list_node *val_list)
Definition:
method_scan.c:237
method_scan_buffer
Definition:
method_scan.h:77
cursor.h
method_scan_buffer::crs_id
CURSOR_ID crs_id
Definition:
method_scan.h:92
method_scan_buffer::val_cnt
int val_cnt
Definition:
method_scan.h:93
qproc_db_value_list
Definition:
xasl.h:193
work_space.h
storage_common.h
db_value
Definition:
dbtype_def.h:1080
THREAD_ENTRY
void THREAD_ENTRY
Definition:
thread_compat.hpp:43
val_list_node
Definition:
xasl.h:205
method_open_scan
int method_open_scan(THREAD_ENTRY *thread_p, METHOD_SCAN_BUFFER *scan_buf, qfile_list_id *list_id, method_sig_list *method_sig_list)
Definition:
method_scan.c:169
method_scan_buffer::vallist
DB_VALUE * vallist
Definition:
method_scan.h:89
method_info::method_sig_list
METHOD_SIG_LIST * method_sig_list
Definition:
method_scan.h:73
dbtype_def.h
method_scan_buffer::method_ctl
METHOD_INFO method_ctl
Definition:
method_scan.h:82
vacomm_buffer::size
int size
Definition:
query_method.h:46
vacomm_buffer::area
char * area
Definition:
query_method.h:43
qfile_list_id
Definition:
query_list.h:426
method_close_scan
int method_close_scan(THREAD_ENTRY *thread_p, METHOD_SCAN_BUFFER *scan_buf)
Definition:
method_scan.c:202
method_sig_list
Definition:
method_def.hpp:66
error
static void error(const char *msg)
Definition:
gencat.c:331
method_scan_buffer::oid_cols
int * oid_cols
Definition:
method_scan.h:91
vacomm_buffer::num_vals
int num_vals
Definition:
query_method.h:42
method_info::list_id
qfile_list_id * list_id
Definition:
method_scan.h:72
cursor_id
Definition:
cursor.h:52
method_scan_buffer::dbval_list
qproc_db_value_list * dbval_list
Definition:
method_scan.h:79
vacomm_buffer::cur_pos
int cur_pos
Definition:
query_method.h:45
vacomm_buffer::buffer
char * buffer
Definition:
query_method.h:44
method_scan_buffer::valptrs
DB_VALUE ** valptrs
Definition:
method_scan.h:90
method_info
Definition:
method_scan.h:70
vacomm_buffer
Definition:
query_method.h:37
src
query
method_scan.h
Generated by
1.8.11