DuroDBMS API  1.2
rdb.h
1 #ifndef RDB_RDB_H
2 #define RDB_RDB_H
3 
4 /*
5 Main DuroDBMS header file.
6 
7 This file is part of DuroDBMS, a relational database management system.
8 Copyright (C) 2003-2009, 2011-2015 Rene Hartmann.
9 
10 DuroDBMS is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 3 of the License, or
13 (at your option) any later version.
14 
15 DuroDBMS is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19 
20 You should have received a copy of the GNU General Public License
21 along with DuroDBMS; if not, write to the Free Software Foundation, Inc.,
22 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24 
25 #include <rec/env.h>
26 #include <rec/dbdefs.h>
27 #include <gen/hashmap.h>
28 #include <gen/hashtable.h>
29 #include <gen/types.h>
30 #include <obj/type.h>
31 #include <obj/object.h>
32 #include <obj/excontext.h>
33 #include <obj/expression.h>
34 #include <obj/builtintypes.h>
35 #include <obj/tuple.h>
36 #include <obj/array.h>
37 #include <obj/operator.h>
38 #include <obj/objmatch.h>
39 
40 #include <stdlib.h>
41 
42 #define RDB_THE_PREFIX "the_"
43 
44 #define RDB_TREAT_PREFIX "treat_as_"
45 #define RDB_TREAT_PREFIX_LEN (sizeof(RDB_TREAT_PREFIX) - 1)
46 
47 typedef struct RDB_expression RDB_expression;
48 
57 typedef struct {
59  char *attrname;
61  RDB_bool asc;
62 } RDB_seq_item;
63 
68 typedef struct RDB_qresult RDB_qresult;
69 
70 /* Function definition for reading lines of input */
71 typedef char *RDB_read_line_fn(void);
72 typedef void RDB_free_line_fn(char *);
73 
74 #ifndef DOXYGEN_SHOULD_SKIP_THIS
75 
76 typedef struct RDB_database RDB_database;
77 
78 typedef struct RDB_transaction RDB_transaction;
79 
80 typedef struct RDB_transaction {
81  /* internal */
82  RDB_database *dbp;
83  RDB_environment *envp;
84  DB_TXN *txid;
85  void *user_data;
86  struct RDB_transaction *parentp;
87  struct RDB_rmlink *delrmp;
88  struct RDB_ixlink *delixp;
89 } RDB_transaction;
90 
91 #endif
92 
93 typedef int RDB_apply_constraint_fn(RDB_expression *, const char *,
94  RDB_exec_context *, RDB_transaction *);
95 
103 typedef struct {
104  char *name;
105  RDB_expression *exp;
107 
112 typedef RDB_object *RDB_getobjfn(const char *, void *);
113 
114 typedef RDB_type *RDB_gettypefn(const char *, void *);
115 
120 enum {
121  RDB_DISTINCT = 1,
122  RDB_INCLUDED = 2
123 };
124 
128 typedef struct {
129  RDB_object *tbp;
130  RDB_object *objp;
131  int flags;
132 } RDB_ma_insert;
133 
134 typedef struct {
135  const char *name;
136  RDB_expression *exp;
138 
142 typedef struct {
143  RDB_object *tbp;
144  RDB_expression *condp;
145  int updc;
146  RDB_attr_update *updv;
147 } RDB_ma_update;
148 
152 typedef struct {
153  RDB_object *tbp;
154  RDB_expression *condp;
155 } RDB_ma_delete;
156 
160 typedef struct {
161  RDB_object *tbp;
162  RDB_object *objp;
163  int flags;
165 
166 typedef struct {
167  RDB_object *dstp;
168  RDB_object *srcp;
169 } RDB_ma_copy;
170 
179 enum {
180  RDB_TYPE_ORDERED = 1,
181  RDB_TYPE_UNION = 2
182 };
183 
188 int
189 RDB_init_builtin(RDB_exec_context *);
190 
191 const char *
192 RDB_db_name(const RDB_database *);
193 
194 RDB_environment *
195 RDB_db_env(RDB_database *);
196 
197 RDB_database *
198 RDB_create_db_from_env(const char *, RDB_environment *,
199  RDB_exec_context *);
200 
201 RDB_database *
202 RDB_get_db_from_env(const char *, RDB_environment *, RDB_exec_context *);
203 
204 int
205 RDB_drop_db(RDB_database *, RDB_exec_context *);
206 
207 int
208 RDB_get_dbs(RDB_environment *, RDB_object *, RDB_exec_context *);
209 
210 RDB_object *
211 RDB_create_table(const char *,
212  int, const RDB_attr[],
213  int, const RDB_string_vec[],
214  RDB_exec_context *, RDB_transaction *);
215 
216 RDB_object *
217 RDB_create_table_from_type(const char *name,
218  RDB_type *,
219  int keyc, const RDB_string_vec[],
220  int, const RDB_attr[],
221  RDB_exec_context *, RDB_transaction *);
222 
223 int
224 RDB_init_table(RDB_object *, const char *,
225  int, const RDB_attr[],
226  int, const RDB_string_vec[],
227  RDB_exec_context *);
228 
229 int
230 RDB_init_table_from_type(RDB_object *, const char *, RDB_type *,
231  int, const RDB_string_vec keyv[],
232  int, const RDB_attr[],
233  RDB_exec_context *);
234 
235 int
236 RDB_create_public_table(const char *,
237  int, const RDB_attr[],
238  int, const RDB_string_vec[],
239  RDB_exec_context *, RDB_transaction *);
240 
241 int
242 RDB_create_public_table_from_type(const char *,
243  RDB_type *,
244  int, const RDB_string_vec[],
245  RDB_exec_context *, RDB_transaction *);
246 
247 int
248 RDB_map_public_table(const char *, RDB_expression *,
249  RDB_exec_context *, RDB_transaction *);
250 
251 RDB_object *
252 RDB_get_table(const char *, RDB_exec_context *, RDB_transaction *);
253 
254 int
255 RDB_drop_table(RDB_object *, RDB_exec_context *, RDB_transaction *);
256 
257 int
258 RDB_drop_table_by_name(const char *, RDB_exec_context *, RDB_transaction *);
259 
260 int
261 RDB_table_keys(RDB_object *, RDB_exec_context *, RDB_string_vec **);
262 
263 const char *
264 RDB_table_name(const RDB_object *);
265 
266 int
267 RDB_set_table_name(RDB_object *, const char *, RDB_exec_context *,
268  RDB_transaction *);
269 
270 int
271 RDB_add_table(RDB_object *, RDB_database *, RDB_exec_context *, RDB_transaction *);
272 
273 int
274 RDB_insert(RDB_object *tbp, const RDB_object *tplp, RDB_exec_context *,
275  RDB_transaction *);
276 
277 RDB_int
278 RDB_update(RDB_object *, RDB_expression *, int attrc,
279  const RDB_attr_update updv[], RDB_exec_context *, RDB_transaction *);
280 
281 RDB_int
282 RDB_delete(RDB_object *tbp, RDB_expression *condp, RDB_exec_context *,
283  RDB_transaction *);
284 
285 int
286 RDB_copy_table(RDB_object *dstp, RDB_object *srcp, RDB_exec_context *,
287  RDB_transaction *);
288 
289 RDB_int
290 RDB_move_tuples(RDB_object *, RDB_object *, int, RDB_exec_context *,
291  RDB_transaction *);
292 
293 RDB_int
294 RDB_multi_assign(int, const RDB_ma_insert[],
295  int, const RDB_ma_update[],
296  int, const RDB_ma_delete[],
297  int, const RDB_ma_vdelete[],
298  int, const RDB_ma_copy[],
299  RDB_getobjfn *, void *,
300  RDB_exec_context *, RDB_transaction *);
301 
302 int
304  int, const RDB_ma_update[],
305  int, const RDB_ma_delete[],
306  int, const RDB_ma_vdelete[],
307  int, const RDB_ma_copy[],
308  RDB_apply_constraint_fn *,
309  RDB_getobjfn *, void *,
310  RDB_exec_context *, RDB_transaction *);
311 
312 int
313 RDB_max(RDB_object *, RDB_expression *, RDB_exec_context *,
314  RDB_transaction *, RDB_object *);
315 
316 int
317 RDB_min(RDB_object *tbp, RDB_expression *, RDB_exec_context *,
318  RDB_transaction *, RDB_object *);
319 
320 int
321 RDB_all(RDB_object *tbp, RDB_expression *, RDB_exec_context *,
322  RDB_transaction *, RDB_bool *);
323 
324 int
325 RDB_any(RDB_object *tbp, RDB_expression *, RDB_exec_context *,
326  RDB_transaction *, RDB_bool *);
327 
328 int
329 RDB_sum(RDB_object *, RDB_expression *, RDB_exec_context *,
330  RDB_transaction *, RDB_object *);
331 
332 int
333 RDB_avg(RDB_object *, RDB_expression *, RDB_exec_context *,
334  RDB_transaction *, RDB_float *);
335 
336 int
337 RDB_table_contains(RDB_object *tbp, const RDB_object *, RDB_exec_context *,
338  RDB_transaction *, RDB_bool *);
339 
340 int
341 RDB_subset(RDB_object *tb1p, RDB_object *tb2p, RDB_exec_context *,
342  RDB_transaction *, RDB_bool *);
343 
344 int
345 RDB_table_matching_tuple(RDB_object *, const RDB_object *, RDB_exec_context *,
346  RDB_transaction *, RDB_bool *);
347 
348 int
349 RDB_extract_tuple(RDB_object *, RDB_exec_context *, RDB_transaction *,
350  RDB_object *);
351 
352 RDB_bool
353 RDB_table_is_persistent(const RDB_object *);
354 
355 RDB_bool
356 RDB_table_is_real(const RDB_object *);
357 
358 RDB_bool
359 RDB_table_is_stored(const RDB_object *);
360 
361 RDB_bool
362 RDB_table_is_user(const RDB_object *);
363 
364 int
365 RDB_table_is_empty(RDB_object *, RDB_exec_context *, RDB_transaction *,
366  RDB_bool *resultp);
367 
368 RDB_int
369 RDB_cardinality(RDB_object *tbp, RDB_exec_context *, RDB_transaction *);
370 
371 RDB_object *
372 RDB_expr_to_vtable(RDB_expression *, RDB_exec_context *, RDB_transaction *);
373 
374 RDB_expression *
375 RDB_vtable_expr(const RDB_object *);
376 
377 RDB_bool
378 RDB_expr_refers(const RDB_expression *, const RDB_object *);
379 
380 RDB_attr *
381 RDB_table_attrs(const RDB_object *, int *);
382 
383 RDB_bool
384 RDB_expr_is_serial(const RDB_expression *);
385 
386 int
387 RDB_create_table_index(const char *name, RDB_object *tbp, int idxcompc,
388  const RDB_seq_item idxcompv[], int flags, RDB_exec_context *,
389  RDB_transaction *);
390 
391 int
392 RDB_drop_table_index(const char *name, RDB_exec_context *, RDB_transaction *);
393 
394 int
395 RDB_infer_keys(RDB_expression *, RDB_getobjfn *, void *,
396  RDB_environment *, RDB_exec_context *, RDB_transaction *,
397  RDB_string_vec **, RDB_bool *);
398 
399 int
400 RDB_define_type(const char *, int, const RDB_possrep[],
401  RDB_expression *, RDB_expression *, int,
402  RDB_exec_context *, RDB_transaction *);
403 
404 int
405 RDB_define_subtype(const char *, int, RDB_type *[], int, const RDB_possrep[],
406  RDB_expression *, RDB_expression *, int, RDB_exec_context *,
407  RDB_transaction *);
408 
409 RDB_type *
410 RDB_get_type(const char *name, RDB_exec_context *, RDB_transaction *);
411 
412 int
413 RDB_drop_type(const char *name, RDB_exec_context *, RDB_transaction *);
414 
415 int
416 RDB_next_attr_sorted(const RDB_type *, const char *);
417 
418 RDB_type *
419 RDB_type_attr_type(const RDB_type *, const char *);
420 
421 RDB_bool
422 RDB_is_selector(const RDB_operator *);
423 
424 RDB_database *
425 RDB_tx_db(RDB_transaction *);
426 
427 RDB_bool
428 RDB_tx_is_running(RDB_transaction *);
429 
430 int
431 RDB_begin_tx(RDB_exec_context *, RDB_transaction *, RDB_database *dbp,
432  RDB_transaction *parent);
433 
434 int
435 RDB_commit(RDB_exec_context *, RDB_transaction *);
436 
437 int
438 RDB_rollback(RDB_exec_context *, RDB_transaction *);
439 
440 int
441 RDB_rollback_all(RDB_exec_context *, RDB_transaction *);
442 
443 void
444 RDB_handle_errcode(int errcode, RDB_exec_context *, RDB_transaction *);
445 
446 int
447 RDB_obj_equals(const RDB_object *, const RDB_object *,
448  RDB_exec_context *, RDB_transaction *, RDB_bool *);
449 
450 int
451 RDB_set_init_value(RDB_object *, RDB_type *, RDB_environment *,
452  RDB_exec_context *);
453 
454 int
455 RDB_extend_tuple(RDB_object *, int attrc, const RDB_virtual_attr attrv[],
456  RDB_getobjfn *, void *, RDB_exec_context *, RDB_transaction *);
457 
458 int
459 RDB_add_tuple(RDB_object *, const RDB_object *,
460  RDB_exec_context *, RDB_transaction *);
461 
462 int
463 RDB_union_tuples(const RDB_object *, const RDB_object *, RDB_exec_context *,
464  RDB_transaction *, RDB_object *);
465 
466 int
467 RDB_wrap_tuple(const RDB_object *tplp, int wrapc, const RDB_wrapping wrapv[],
468  RDB_exec_context *, RDB_object *restplp);
469 
470 int
471 RDB_unwrap_tuple(const RDB_object *tplp, int attrc, char *attrv[],
472  RDB_exec_context *, RDB_object *restplp);
473 
474 int
475 RDB_table_to_array(RDB_object *arrp, RDB_object *,
476  int seqitc, const RDB_seq_item seqitv[], int flags,
477  RDB_exec_context *, RDB_transaction *);
478 
479 RDB_qresult *
480 RDB_table_iterator(RDB_object *, int, const RDB_seq_item[],
481  RDB_exec_context *, RDB_transaction *);
482 
483 int
484 RDB_del_table_iterator(RDB_qresult *, RDB_exec_context *, RDB_transaction *);
485 
486 int
487 RDB_next_tuple(RDB_qresult *, RDB_object *, RDB_exec_context *,
488  RDB_transaction *);
489 
490 int
491 RDB_obj_property(const RDB_object *, const char *compname,
492  RDB_object *comp, RDB_environment *,
493  RDB_exec_context *, RDB_transaction *);
494 
495 int
496 RDB_obj_set_property(RDB_object *, const char *compname,
497  const RDB_object *comp, RDB_environment *,
498  RDB_exec_context *, RDB_transaction *);
499 
500 int
501 RDB_evaluate(RDB_expression *, RDB_getobjfn *, void *, RDB_environment *,
502  RDB_exec_context *, RDB_transaction *, RDB_object *);
503 
504 RDB_type *
505 RDB_expr_type(RDB_expression *, RDB_gettypefn *, void *,
506  RDB_environment *, RDB_exec_context *, RDB_transaction *);
507 
508 int
509 RDB_expr_equals(const RDB_expression *, const RDB_expression *,
510  RDB_exec_context *, RDB_transaction *, RDB_bool *);
511 
512 int
513 RDB_evaluate_bool(RDB_expression *, RDB_getobjfn *getfnp, void *getdata,
514  RDB_environment *, RDB_exec_context *, RDB_transaction *, RDB_bool *);
515 
516 int
517 RDB_expr_resolve_varname_expr(RDB_expression **, const char *,
518  RDB_expression *, RDB_exec_context *);
519 
520 RDB_expression *
521 RDB_expr_resolve_varnames(RDB_expression *, RDB_getobjfn *,
522  void *, RDB_exec_context *, RDB_transaction *);
523 
524 int
525 RDB_create_ro_op(const char *, int, RDB_parameter[], RDB_type *,
526  const char *, const char *,
527  const char *,
528  RDB_exec_context *, RDB_transaction *);
529 
530 int
531 RDB_create_ro_op_version(const char *, const char *,
532  int, RDB_parameter[], RDB_type *,
533  const char *, const char *,
534  const char *,
535  RDB_exec_context *, RDB_transaction *);
536 
537 int
538 RDB_create_update_op(const char *, int, RDB_parameter[],
539  const char *, const char *,
540  const char *,
541  RDB_exec_context *, RDB_transaction *);
542 
543 int
544 RDB_create_update_op_version(const char *, const char *, int, RDB_parameter[],
545  const char *, const char *,
546  const char *,
547  RDB_exec_context *, RDB_transaction *);
548 
549 RDB_operator *
550 RDB_get_update_op(const char *, int, RDB_type *[],
551  RDB_environment *, RDB_exec_context *, RDB_transaction *);
552 
553 RDB_operator *
554 RDB_get_update_op_by_args(const char *, int, RDB_object *[],
555  RDB_environment *, RDB_exec_context *, RDB_transaction *);
556 
557 int
558 RDB_call_ro_op_by_name(const char *, int, RDB_object *[],
559  RDB_exec_context *, RDB_transaction *, RDB_object *);
560 
561 int
562 RDB_call_ro_op_by_name_e(const char *, int, RDB_object *[], RDB_environment *,
563  RDB_exec_context *, RDB_transaction *, RDB_object *);
564 
565 int
566 RDB_call_update_op_by_name(const char *name, int argc, RDB_object *argv[],
567  RDB_exec_context *, RDB_transaction *);
568 
569 int
570 RDB_call_update_op(RDB_operator *, int argc, RDB_object *[],
571  RDB_exec_context *, RDB_transaction *);
572 
573 int
574 RDB_drop_op(const char *, RDB_exec_context *, RDB_transaction *);
575 
576 int
577 RDB_drop_op_version(const char *, const char *,
578  RDB_exec_context *, RDB_transaction *);
579 
580 int
581 RDB_put_global_ro_op(const char *, int, RDB_type **, RDB_type *,
582  RDB_ro_op_func *, RDB_exec_context *);
583 
584 int
585 RDB_create_constraint(const char *name, RDB_expression *,
586  RDB_exec_context *, RDB_transaction *);
587 
588 int
589 RDB_drop_constraint(const char *name, RDB_exec_context *,
590  RDB_transaction *);
591 
592 int
593 RDB_net_form_to_tuple(RDB_object *, const char *, RDB_exec_context *);
594 
595 int
596 RDB_net_hescape(RDB_object *, const char *, RDB_exec_context *);
597 
598 int
599 RDB_obj_to_bin(RDB_object *, const RDB_object *, RDB_exec_context *);
600 
601 int
602 RDB_bin_to_obj(const RDB_object *, RDB_object *, RDB_exec_context *);
603 
604 #endif
RDB_bool asc
Definition: rdb.h:61
Definition: rdb.h:57
int RDB_drop_table_by_name(const char *, RDB_exec_context *, RDB_transaction *)
Definition: database.c:1634
int RDB_set_table_name(RDB_object *, const char *, RDB_exec_context *, RDB_transaction *)
Definition: database.c:1666
Definition: type.h:76
const char * RDB_db_name(const RDB_database *)
Definition: database.c:42
int RDB_init_table(RDB_object *, const char *, int, const RDB_attr[], int, const RDB_string_vec[], RDB_exec_context *)
Definition: table.c:372
RDB_environment * RDB_db_env(RDB_database *)
Definition: database.c:56
int RDB_drop_table(RDB_object *, RDB_exec_context *, RDB_transaction *)
Definition: database.c:1539
int RDB_table_contains(RDB_object *tbp, const RDB_object *, RDB_exec_context *, RDB_transaction *, RDB_bool *)
Definition: contains.c:51
int RDB_begin_tx(RDB_exec_context *, RDB_transaction *, RDB_database *dbp, RDB_transaction *parent)
Definition: transaction.c:131
RDB_object * RDB_get_table(const char *, RDB_exec_context *, RDB_transaction *)
Definition: database.c:1261
RDB_int RDB_multi_assign(int, const RDB_ma_insert[], int, const RDB_ma_update[], int, const RDB_ma_delete[], int, const RDB_ma_vdelete[], int, const RDB_ma_copy[], RDB_getobjfn *, void *, RDB_exec_context *, RDB_transaction *)
Definition: assign.c:2163
int RDB_obj_property(const RDB_object *, const char *compname, RDB_object *comp, RDB_environment *, RDB_exec_context *, RDB_transaction *)
Definition: objectx.c:707
Definition: operator.h:38
int RDB_set_init_value(RDB_object *, RDB_type *, RDB_environment *, RDB_exec_context *)
Definition: objectx.c:888
int RDB_extend_tuple(RDB_object *, int attrc, const RDB_virtual_attr attrv[], RDB_getobjfn *, void *, RDB_exec_context *, RDB_transaction *)
Definition: tuplex.c:153
int RDB_call_update_op(RDB_operator*, int argc, RDB_object *[], RDB_exec_context *, RDB_transaction *)
Definition: uoperator.c:785
int RDB_init_builtin(RDB_exec_context *)
Definition: builtinops.c:1306
int RDB_obj_set_property(RDB_object *, const char *compname, const RDB_object *comp, RDB_environment *, RDB_exec_context *, RDB_transaction *)
Definition: objectx.c:804
int RDB_table_to_array(RDB_object *arrp, RDB_object *, int seqitc, const RDB_seq_item seqitv[], int flags, RDB_exec_context *, RDB_transaction *)
Definition: arrayx.c:126
RDB_object * RDB_create_table_from_type(const char *name, RDB_type *, int keyc, const RDB_string_vec[], int, const RDB_attr[], RDB_exec_context *, RDB_transaction *)
Definition: database.c:1186
RDB_object * RDB_expr_to_vtable(RDB_expression *, RDB_exec_context *, RDB_transaction *)
Definition: vtable.c:76
int RDB_drop_constraint(const char *name, RDB_exec_context *, RDB_transaction *)
Definition: constraint.c:263
char * attrname
Definition: rdb.h:59
int RDB_expr_resolve_varname_expr(RDB_expression **, const char *, RDB_expression *, RDB_exec_context *)
Definition: expression.c:63
int RDB_commit(RDB_exec_context *, RDB_transaction *)
Definition: transaction.c:155
int RDB_create_update_op(const char *, int, RDB_parameter[], const char *, const char *, const char *, RDB_exec_context *, RDB_transaction *)
Definition: uoperator.c:302
RDB_bool RDB_expr_refers(const RDB_expression *, const RDB_object *)
Definition: expressionx.c:154
int RDB_init_table_from_type(RDB_object *tbp, const char *name, RDB_type *reltyp, int keyc, const RDB_string_vec keyv[], int default_attrc, const RDB_attr *default_attrv, RDB_exec_context *ecp)
Definition: table.c:335
RDB_bool RDB_table_is_user(const RDB_object *)
Definition: table.c:630
int RDB_map_public_table(const char *, RDB_expression *, RDB_exec_context *, RDB_transaction *)
Definition: ptable.c:156
int RDB_apply_constraints(int, const RDB_ma_insert[], int, const RDB_ma_update[], int, const RDB_ma_delete[], int, const RDB_ma_vdelete[], int, const RDB_ma_copy[], RDB_apply_constraint_fn *, RDB_getobjfn *, void *, RDB_exec_context *, RDB_transaction *)
Definition: assign.c:2707
int RDB_union_tuples(const RDB_object *, const RDB_object *, RDB_exec_context *, RDB_transaction *, RDB_object *)
Definition: tuplex.c:107
int RDB_call_update_op_by_name(const char *name, int argc, RDB_object *argv[], RDB_exec_context *, RDB_transaction *)
Definition: uoperator.c:761
RDB_expression * RDB_expr_resolve_varnames(RDB_expression *, RDB_getobjfn *, void *, RDB_exec_context *, RDB_transaction *)
Definition: expressionx.c:25
RDB_type * RDB_get_type(const char *name, RDB_exec_context *, RDB_transaction *)
Definition: utype.c:724
int RDB_rollback(RDB_exec_context *, RDB_transaction *)
Definition: transaction.c:200
int RDB_drop_db(RDB_database *, RDB_exec_context *)
Definition: database.c:803
RDB_attr * RDB_table_attrs(const RDB_object *, int *)
Definition: table.c:730
int RDB_table_is_empty(RDB_object *, RDB_exec_context *, RDB_transaction *, RDB_bool *resultp)
Definition: aggrf.c:804
RDB_int RDB_cardinality(RDB_object *tbp, RDB_exec_context *, RDB_transaction *)
Definition: aggrf.c:860
const char * RDB_table_name(const RDB_object *)
Definition: table.c:432
Definition: rdb.h:103
RDB_operator* RDB_get_update_op(const char *, int, RDB_type *[], RDB_environment *, RDB_exec_context *, RDB_transaction *)
Definition: uoperator.c:578
RDB_int RDB_move_tuples(RDB_object *, RDB_object *, int, RDB_exec_context *, RDB_transaction *)
Definition: table.c:271
int RDB_call_ro_op_by_name_e(const char *, int, RDB_object *[], RDB_environment *, RDB_exec_context *, RDB_transaction *, RDB_object *)
Definition: uoperator.c:449
Definition: rdb.h:160
int RDB_create_constraint(const char *name, RDB_expression *, RDB_exec_context *, RDB_transaction *)
Definition: constraint.c:186
RDB_bool RDB_tx_is_running(RDB_transaction *)
Definition: transaction.c:258
RDB_int RDB_delete(RDB_object *tbp, RDB_expression *condp, RDB_exec_context *, RDB_transaction *)
Definition: assign.c:2684
Definition: rdb.h:128
int RDB_create_ro_op(const char *, int, RDB_parameter[], RDB_type *, const char *, const char *, const char *, RDB_exec_context *, RDB_transaction *)
Definition: uoperator.c:158
int RDB_table_matching_tuple(RDB_object *, const RDB_object *, RDB_exec_context *, RDB_transaction *, RDB_bool *)
Definition: match.c:358
int RDB_create_table_index(const char *name, RDB_object *tbp, int idxcompc, const RDB_seq_item idxcompv[], int flags, RDB_exec_context *, RDB_transaction *)
Definition: table.c:1014
int RDB_wrap_tuple(const RDB_object *tplp, int wrapc, const RDB_wrapping wrapv[], RDB_exec_context *, RDB_object *restplp)
Definition: tuplex.c:246
Definition: type.h:26
Definition: rdb.h:166
int RDB_insert(RDB_object *tbp, const RDB_object *tplp, RDB_exec_context *, RDB_transaction *)
Definition: assign.c:2554
int RDB_create_ro_op_version(const char *, const char *, int, RDB_parameter[], RDB_type *, const char *, const char *, const char *, RDB_exec_context *, RDB_transaction *)
Definition: uoperator.c:173
RDB_bool RDB_table_is_real(const RDB_object *)
Definition: table.c:601
int RDB_unwrap_tuple(const RDB_object *tplp, int attrc, char *attrv[], RDB_exec_context *, RDB_object *restplp)
Definition: tuplex.c:324
int RDB_sum(RDB_object *, RDB_expression *, RDB_exec_context *, RDB_transaction *, RDB_object *)
Definition: aggrf.c:547
Definition: rdb.h:152
int RDB_any(RDB_object *tbp, RDB_expression *, RDB_exec_context *, RDB_transaction *, RDB_bool *)
Definition: aggrf.c:171
Definition: rdb.h:142
int RDB_all(RDB_object *tbp, RDB_expression *, RDB_exec_context *, RDB_transaction *, RDB_bool *)
Definition: aggrf.c:55
int RDB_drop_table_index(const char *name, RDB_exec_context *, RDB_transaction *)
Definition: table.c:1117
RDB_operator* RDB_get_update_op_by_args(const char *, int, RDB_object *[], RDB_environment *, RDB_exec_context *, RDB_transaction *)
Definition: uoperator.c:668
int RDB_drop_op(const char *, RDB_exec_context *, RDB_transaction *)
Definition: uoperator.c:815
int RDB_obj_equals(const RDB_object *, const RDB_object *, RDB_exec_context *, RDB_transaction *, RDB_bool *)
Definition: objectx.c:652
RDB_object * RDB_create_table(const char *, int, const RDB_attr[], int, const RDB_string_vec[], RDB_exec_context *, RDB_transaction *)
Definition: database.c:1155
int RDB_subset(RDB_object *tb1p, RDB_object *tb2p, RDB_exec_context *, RDB_transaction *, RDB_bool *)
Definition: table.c:664
RDB_database * RDB_get_db_from_env(const char *, RDB_environment *, RDB_exec_context *)
Definition: database.c:651
int RDB_max(RDB_object *, RDB_expression *, RDB_exec_context *, RDB_transaction *, RDB_object *)
Definition: aggrf.c:287
Definition: rdb.h:134
int RDB_add_table(RDB_object *, RDB_database *, RDB_exec_context *, RDB_transaction *)
Definition: database.c:1806
RDB_bool RDB_table_is_persistent(const RDB_object *)
Definition: table.c:584
int RDB_rollback_all(RDB_exec_context *, RDB_transaction *)
Definition: transaction.c:235
int RDB_drop_type(const char *name, RDB_exec_context *, RDB_transaction *)
Definition: utype.c:496
int RDB_define_type(const char *, int, const RDB_possrep[], RDB_expression *, RDB_expression *, int, RDB_exec_context *, RDB_transaction *)
Definition: utype.c:217
int RDB_create_public_table(const char *, int, const RDB_attr[], int, const RDB_string_vec[], RDB_exec_context *, RDB_transaction *)
Definition: ptable.c:116
Definition: type.h:136
int RDB_evaluate(RDB_expression *, RDB_getobjfn *, void *, RDB_environment *, RDB_exec_context *, RDB_transaction *, RDB_object *)
Definition: evaluate.c:705
RDB_type * RDB_expr_type(RDB_expression *, RDB_gettypefn *, void *, RDB_environment *, RDB_exec_context *, RDB_transaction *)
Definition: exprtype.c:1258
RDB_bool RDB_is_selector(const RDB_operator*)
Definition: utype.c:610
int RDB_expr_equals(const RDB_expression *, const RDB_expression *, RDB_exec_context *, RDB_transaction *, RDB_bool *)
Definition: expressionx.c:99
RDB_bool RDB_table_is_stored(const RDB_object *)
Definition: table.c:616
int RDB_avg(RDB_object *, RDB_expression *, RDB_exec_context *, RDB_transaction *, RDB_float *)
Definition: aggrf.c:685
RDB_int RDB_update(RDB_object *, RDB_expression *, int attrc, const RDB_attr_update updv[], RDB_exec_context *, RDB_transaction *)
Definition: assign.c:2631
Definition: type.h:66
RDB_database * RDB_tx_db(RDB_transaction *)
Definition: transaction.c:272
int RDB_extract_tuple(RDB_object *, RDB_exec_context *, RDB_transaction *, RDB_object *)
Definition: table.c:517
int RDB_get_dbs(RDB_environment *, RDB_object *, RDB_exec_context *)
Definition: database.c:932
int RDB_copy_table(RDB_object *dstp, RDB_object *srcp, RDB_exec_context *, RDB_transaction *)
Definition: table.c:469
int RDB_define_subtype(const char *, int, RDB_type *[], int, const RDB_possrep[], RDB_expression *, RDB_expression *, int, RDB_exec_context *, RDB_transaction *)
Definition: utype.c:254
int RDB_call_ro_op_by_name(const char *, int, RDB_object *[], RDB_exec_context *, RDB_transaction *, RDB_object *)
Definition: uoperator.c:435
int RDB_min(RDB_object *tbp, RDB_expression *, RDB_exec_context *, RDB_transaction *, RDB_object *)
Definition: aggrf.c:417
RDB_database * RDB_create_db_from_env(const char *, RDB_environment *, RDB_exec_context *)
Definition: database.c:610