-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqapla.h
40 lines (35 loc) · 1.46 KB
/
qapla.h
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
/*
* **************************************************************
* Copyright (c) 2017-2022, Aastha Mehta <[email protected]>
* All rights reserved.
*
* This source code is licensed under the BSD-style license found
* in the LICENSE file in the root directory of this source tree.
* **************************************************************
*/
#ifndef __QAPLA_PARSER_IF_H__
#define __QAPLA_PARSER_IF_H__
#include "qinfo/query_info.h"
#include "qinfo/metadata.h"
#ifdef __cplusplus
extern "C" {
#endif
void init_query_info(query_info_t *qinfo, const char *schema_name,
const char *logname, app_info_t *ai);
void _init_query_info(query_info_t *qinfo, const char *schema_name,
const char *logname, int db_type, app_info_t *ai);
void set_user_session(query_info_t *qinfo, char *sessid, char *email, char *pwd);
void set_expected_or_unexpected_columns(query_info_t *qinfo,
char *cstr, int cstr_len, int expected);
int run_refmon(query_info_t *qinfo, const char *text, size_t length,
int is_utf8, int pe_method, char **rewritten_q, int *rewritten_qlen);
void get_rewritten_query(query_info_t *qinfo, char **q, int *qlen);
void print_query(query_info_t *qinfo, const char *text, size_t length, int is_utf8);
void reset_query_info(query_info_t *qinfo);
void flush_query_info_cache(query_info_t *qinfo);
void cleanup_query_info(query_info_t *qinfo);
void dbg_log(query_info_t *qinfo, char *logstr);
#ifdef __cplusplus
}
#endif
#endif /* __QAPLA_PARSER_IF_H__ */