reformat source code

according to code styles, 'AccessModifierOffset' should be -2.
This commit is contained in:
gm
2021-06-16 15:48:42 +08:00
committed by MizuhaHimuraki
parent 8c4a2f26a6
commit 4a92b6d7df
3314 changed files with 23131 additions and 23401 deletions

View File

@ -24,7 +24,7 @@ namespace oceanbase {
namespace sql {
struct ObMPParseStat {
public:
public:
ObMPParseStat() : parse_fail_(false), fail_ret_(common::OB_SUCCESS), fail_query_idx_(-1)
{}
void reset()
@ -43,7 +43,7 @@ struct PreParseResult {
};
class ObParser {
public:
public:
explicit ObParser(common::ObIAllocator& allocator, ObSQLMode mode,
common::ObCollationType conn_collation = common::CS_TYPE_UTF8MB4_GENERAL_CI);
virtual ~ObParser();
@ -78,16 +78,16 @@ class ObParser {
int prepare_parse(const common::ObString& query, void* ns, ParseResult& parse_result);
static int pre_parse(const common::ObString& stmt, PreParseResult& res);
private:
private:
static int scan_trace_id(const char* ptr, int64_t len, int32_t& pos, common::ObString& trace_id);
static bool is_trace_id_end(char ch);
static bool is_space(char ch);
// types and constants
private:
private:
// disallow copy
DISALLOW_COPY_AND_ASSIGN(ObParser);
// function members
private:
private:
// data members
common::ObIAllocator* allocator_;
// when sql_mode = "ANSI_QUOTES", Treat " as an identifier quote character

View File

@ -97,7 +97,7 @@ inline void databuff_simple_print_obj(
}
class ObParserResultTreePrintWrapper {
public:
public:
explicit ObParserResultTreePrintWrapper(const ParseNode& parse_tree) : parse_tree_(parse_tree)
{}
int64_t to_string(char* buf, const int64_t buf_len) const
@ -108,15 +108,15 @@ class ObParserResultTreePrintWrapper {
return pos;
}
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObParserResultTreePrintWrapper);
private:
private:
const ParseNode& parse_tree_;
};
class ObParserResultPrintWrapper {
public:
public:
explicit ObParserResultPrintWrapper(const ParseNode& parse_tree) : parse_tree_(parse_tree)
{}
int64_t to_string(char* buf, const int64_t buf_len) const
@ -126,10 +126,10 @@ class ObParserResultPrintWrapper {
return pos;
}
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObParserResultPrintWrapper);
private:
private:
const ParseNode& parse_tree_;
};

View File

@ -25,7 +25,7 @@ class ObIAllocator;
namespace sql {
class ObSQLParser {
public:
public:
ObSQLParser(common::ObIAllocator& allocator, ObSQLMode mode) : allocator_(allocator), sql_mode_(mode)
{}
@ -36,10 +36,10 @@ class ObSQLParser {
int parse_and_gen_sqlid(
void* malloc_pool, const char* str_ptr, const int64_t str_len, const int64_t len, char* sql_id);
private:
private:
int gen_sqlid(const char* paramed_sql, const int64_t sql_len, const int64_t len, char* sql_id);
private:
private:
common::ObIAllocator& allocator_;
ObSQLMode sql_mode_;
};

View File

@ -216,9 +216,8 @@ int parse_sql_stmt(ParseResult* parse_result)
return ret;
}
void setup_token_pos_info(ParseNode *node __attribute__((unused)),
int off __attribute__((unused)),
int len __attribute__((unused)))
void setup_token_pos_info(
ParseNode* node __attribute__((unused)), int off __attribute__((unused)), int len __attribute__((unused)))
{
#ifdef SQL_PARSER_COMPILATION
node->token_off_ = off;
@ -228,10 +227,8 @@ void setup_token_pos_info(ParseNode *node __attribute__((unused)),
#endif
}
int setup_token_pos_info_and_dup_string(ParseNode *node __attribute__((unused)),
ParseResult *result __attribute__((unused)),
int start __attribute__((unused)),
int end __attribute__((unused)))
int setup_token_pos_info_and_dup_string(ParseNode* node __attribute__((unused)),
ParseResult* result __attribute__((unused)), int start __attribute__((unused)), int end __attribute__((unused)))
{
int ret = OB_PARSER_SUCCESS;
#ifdef SQL_PARSER_COMPILATION