forked from IvorySQL/IvorySQL
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparse_param.h
More file actions
67 lines (59 loc) · 2.51 KB
/
Copy pathparse_param.h
File metadata and controls
67 lines (59 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*-------------------------------------------------------------------------
*
* parse_param.h
* handle parameters in parser
*
* Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* src/include/parser/parse_param.h
*
*-------------------------------------------------------------------------
*/
#ifndef PARSE_PARAM_H
#define PARSE_PARAM_H
#include "parser/parse_node.h"
extern void setup_parse_fixed_parameters(ParseState *pstate,
const Oid *paramTypes, int numParams);
extern void setup_parse_variable_parameters(ParseState *pstate,
Oid **paramTypes, int *numParams);
extern void check_variable_parameters(ParseState *pstate, Query *query);
extern bool query_contains_extern_params(Query *query);
/*
* The oid type has a total of 32 bits, and the highest 3 bits are used as:
* first is arg of '{? = call}',
* second means OUT mode,
* third means IN modes.
* left 29 bits for value of type.
*/
#define IsLeftCall(typeoid) ((typeoid) & 0x80000000)
#define IsModeOut(typeoid) ((typeoid) & 0x40000000)
#define SetModeOut(typeoid) ((typeoid) |= 0x40000000)
#define UnSetModeOut(typeoid) ((typeoid) &= 0x1FFFFFFF)
#define IsModeIn(typeoid) ((typeoid) & 0x20000000)
#define SetModeIn(typeoid) ((typeoid) |= 0x20000000)
extern Node *ParseParamVariable(Node *arg);
extern void ParseVarParamState(void *arg, Node *param, bool *isOut,
bool *isIn, bool *isLeftCall);
extern void GetParamMode(Oid *paramTypes, int numParams, char *modes);
extern int push_oraparam_stack(void);
extern void pop_oraparam_stack(int top, int cur);
extern void get_oraparam_level(int *top, int *cur);
extern void SetVarParamState(void *arg, Param *param, int index);
extern void forward_oraparam_stack(void);
extern void backward_oraparam_stack(void);
extern bool calculate_oraparamnumbers(List *parsetree_list);
extern int calculate_oraparamnumber(const char* name);
extern bool get_ParseDynSql(void);
extern void set_ParseDynSql(bool value);
extern void check_variables_does_match(int variables);
extern void set_haspgparam(bool value);
extern bool get_doStmtCheckVar(void);
extern void set_doStmtCheckVar(bool values);
extern void set_parseDynDoStmt(bool value);
extern bool get_bindByName(void);
extern void set_bindByName(bool value);
extern void setdynamic_callparser(bool value);
extern int calculate_oraparamname(char ***paramnames);
extern int calculate_oraparamname_position(Node *parsetree, char ***paramnames);
#endif /* PARSE_PARAM_H */