同步操作将从 搜狗开源/workflow 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/*Copyright (c) 2019 Sogou, Inc.Licensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.Authors: Wu Jiaxu (wujiaxu@sogou-inc.com)*/#ifndef _MYSQLMESSAGE_H_#define _MYSQLMESSAGE_H_#include <stdint.h>#include <string>#include "ProtocolMessage.h"#include "mysql_stream.h"#include "mysql_parser.h"#include "mysql_byteorder.h"/*** @file MySQLMessage.h* @brief MySQL Protocol Interface*/namespace protocol{class MySQLMessage : public ProtocolMessage{public:mysql_parser_t *get_parser() const;int get_seqid() const;void set_seqid(int seqid);int get_command() const;protected:virtual int append(const void *buf, size_t *size);virtual int encode(struct iovec vectors[], int max);virtual int decode_packet(const unsigned char *buf, size_t buflen) { return 1; }void set_command(int cmd) const;//appendmysql_stream_t *stream_;mysql_parser_t *parser_;//encodeunsigned char heads_[256][4];uint8_t seqid_;std::string buf_;size_t cur_size_;public:MySQLMessage();virtual ~MySQLMessage();//move constructorMySQLMessage(MySQLMessage&& move);//move operatorMySQLMessage& operator= (MySQLMessage&& move);};class MySQLRequest : public MySQLMessage{public:void set_query(const char *query);void set_query(const std::string& query);void set_query(const char *query, size_t length);std::string get_query() const;bool query_is_unset() const;public:MySQLRequest() = default;//move constructorMySQLRequest(MySQLRequest&& move) = default;//move operatorMySQLRequest& operator= (MySQLRequest&& move) = default;};class MySQLResponse : public MySQLMessage{public:bool is_ok_packet() const;bool is_error_packet() const;int get_packet_type() const;unsigned long long get_affected_rows() const;unsigned long long get_last_insert_id() const;int get_warnings() const;int get_error_code() const;std::string get_error_msg() const;std::string get_sql_state() const;std::string get_info() const;void set_ok_packet();public:MySQLResponse() = default;//move constructorMySQLResponse(MySQLResponse&& move) = default;//move operatorMySQLResponse& operator= (MySQLResponse&& move) = default;protected:virtual int decode_packet(const unsigned char *buf, size_t buflen);};}//impl. not for user#include "MySQLMessage.inl"#endif
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。