DuroDBMS API  1.2
operator.h
1 /*
2  * Operator functions.
3  *
4  * Copyright (C) 2013, 2015 Rene Hartmann.
5  * See the file COPYING for redistribution information.
6  */
7 
8 #ifndef OPERATOR_H_
9 #define OPERATOR_H_
10 
11 #include "object.h"
12 #include "excontext.h"
13 
14 #include <ltdl.h>
15 
16 typedef struct RDB_op_data RDB_operator;
17 typedef struct RDB_transaction RDB_transaction;
18 
19 typedef int RDB_ro_op_func(int, RDB_object *[], RDB_operator *,
20  RDB_exec_context *, RDB_transaction *,
21  RDB_object *);
22 
23 typedef int RDB_upd_op_func(int, RDB_object *[], RDB_operator *,
24  RDB_exec_context *, RDB_transaction *);
25 
33 typedef void RDB_op_cleanup_func(RDB_operator *);
34 
38 typedef struct RDB_parameter {
43 
48  RDB_bool update;
50 
56 RDB_get_parameter(const RDB_operator *, int);
57 
58 const char *
59 RDB_operator_name(const RDB_operator *);
60 
61 RDB_type *
62 RDB_operator_type(const RDB_operator *);
63 
64 int
65 RDB_operator_param_count(const RDB_operator *);
66 
70 RDB_type *
71 RDB_return_type(const RDB_operator *);
72 
79 const char *
80 RDB_operator_source(const RDB_operator *);
81 
83 RDB_get_parameter(const RDB_operator *, int);
84 
85 const char *
86 RDB_operator_name(const RDB_operator *);
87 
88 RDB_type *
89 RDB_return_type(const RDB_operator *);
90 
91 const char *
92 RDB_operator_source(const RDB_operator *);
93 
94 RDB_object *
95 RDB_operator_creation_time(RDB_operator *);
96 
97 void *
98 RDB_operator_u_data(const RDB_operator *);
99 
100 void
101 RDB_set_operator_u_data(RDB_operator *, void *);
102 
103 void
105 
106 RDB_operator *
107 RDB_new_op_data(const char *, const char *, int, RDB_type *[],
108  RDB_type *, RDB_exec_context *);
109 
110 int
111 RDB_free_op_data(RDB_operator *, RDB_exec_context *);
112 
113 RDB_bool
114 RDB_operator_is_implemented(const RDB_operator *);
115 
116 #endif /* OPERATOR_H_ */
RDB_type * typ
Definition: operator.h:42
int RDB_operator_param_count(const RDB_operator*)
Definition: operator.c:52
Definition: type.h:76
RDB_type * RDB_return_type(const RDB_operator*)
Definition: operator.c:62
Definition: operator.h:38
struct RDB_parameter RDB_parameter
RDB_bool update
Definition: operator.h:48
RDB_type * RDB_operator_type(const RDB_operator*)
Definition: operator.c:43
RDB_object * RDB_operator_creation_time(RDB_operator*)
Definition: operator.c:99
RDB_parameter * RDB_get_parameter(const RDB_operator*, int)
Definition: operator.c:21
void RDB_op_cleanup_func(RDB_operator*)
Definition: operator.h:33
void RDB_set_op_cleanup_fn(RDB_operator*, RDB_op_cleanup_func *)
Definition: operator.c:109
const char * RDB_operator_name(const RDB_operator*)
Definition: operator.c:32
const char * RDB_operator_source(const RDB_operator*)
Definition: operator.c:86