patch 4.0
This commit is contained in:
@ -17,47 +17,35 @@
|
||||
#include "sql/resolver/ddl/ob_ddl_stmt.h"
|
||||
#include "sql/resolver/ob_stmt_resolver.h"
|
||||
|
||||
namespace oceanbase {
|
||||
namespace sql {
|
||||
namespace oceanbase
|
||||
{
|
||||
namespace sql
|
||||
{
|
||||
|
||||
class ObTruncateTableStmt : public ObDDLStmt {
|
||||
class ObTruncateTableStmt : public ObDDLStmt
|
||||
{
|
||||
public:
|
||||
explicit ObTruncateTableStmt(common::ObIAllocator* name_pool);
|
||||
explicit ObTruncateTableStmt(common::ObIAllocator *name_pool);
|
||||
ObTruncateTableStmt();
|
||||
virtual ~ObTruncateTableStmt();
|
||||
void set_database_name(const common::ObString& db_name);
|
||||
void set_table_name(const common::ObString& table_name);
|
||||
void set_database_name(const common::ObString &db_name);
|
||||
void set_table_name(const common::ObString &table_name);
|
||||
void set_tenant_id(const uint64_t tenant_id);
|
||||
uint64_t get_tenant_id() const
|
||||
{
|
||||
return truncate_table_arg_.tenant_id_;
|
||||
}
|
||||
const common::ObString& get_database_name() const
|
||||
{
|
||||
return truncate_table_arg_.database_name_;
|
||||
}
|
||||
const common::ObString& get_table_name() const
|
||||
{
|
||||
return truncate_table_arg_.table_name_;
|
||||
}
|
||||
void set_create_mode(obrpc::ObCreateTableMode create_mode)
|
||||
{
|
||||
truncate_table_arg_.create_mode_ = create_mode;
|
||||
}
|
||||
|
||||
inline const obrpc::ObTruncateTableArg& get_truncate_table_arg() const;
|
||||
obrpc::ObTruncateTableArg& get_truncate_table_arg()
|
||||
{
|
||||
return truncate_table_arg_;
|
||||
}
|
||||
virtual obrpc::ObDDLArg& get_ddl_arg()
|
||||
{
|
||||
return truncate_table_arg_;
|
||||
}
|
||||
TO_STRING_KV(K_(stmt_type), K_(truncate_table_arg));
|
||||
uint64_t get_tenant_id() const { return truncate_table_arg_.tenant_id_; }
|
||||
const common::ObString& get_database_name() const { return truncate_table_arg_.database_name_; }
|
||||
const common::ObString& get_table_name() const { return truncate_table_arg_.table_name_; }
|
||||
void set_is_add_scheduler(bool is_add_to_scheduler)
|
||||
{ truncate_table_arg_.is_add_to_scheduler_ = is_add_to_scheduler; }
|
||||
|
||||
inline const obrpc::ObTruncateTableArg &get_truncate_table_arg() const;
|
||||
obrpc::ObTruncateTableArg &get_truncate_table_arg() { return truncate_table_arg_; }
|
||||
virtual obrpc::ObDDLArg &get_ddl_arg() { return truncate_table_arg_; }
|
||||
void set_truncate_oracle_temp_table() { is_truncate_oracle_temp_table_ = true; }
|
||||
bool is_truncate_oracle_temp_table() { return is_truncate_oracle_temp_table_; }
|
||||
TO_STRING_KV(K_(stmt_type),K_(truncate_table_arg));
|
||||
private:
|
||||
obrpc::ObTruncateTableArg truncate_table_arg_;
|
||||
bool is_truncate_oracle_temp_table_;
|
||||
DISALLOW_COPY_AND_ASSIGN(ObTruncateTableStmt);
|
||||
};
|
||||
|
||||
@ -66,11 +54,11 @@ inline void ObTruncateTableStmt::set_tenant_id(const uint64_t tenant_id)
|
||||
truncate_table_arg_.tenant_id_ = tenant_id;
|
||||
}
|
||||
|
||||
inline const obrpc::ObTruncateTableArg& ObTruncateTableStmt::get_truncate_table_arg() const
|
||||
inline const obrpc::ObTruncateTableArg &ObTruncateTableStmt::get_truncate_table_arg() const
|
||||
{
|
||||
return truncate_table_arg_;
|
||||
}
|
||||
|
||||
} // namespace sql
|
||||
} // namespace oceanbase
|
||||
#endif // OCEANBASE_SQL_OB_TRUNCATE_TABLE_STMT_
|
||||
} // namespace sql
|
||||
} // namespace oceanbase
|
||||
#endif //OCEANBASE_SQL_OB_TRUNCATE_TABLE_STMT_
|
||||
|
||||
Reference in New Issue
Block a user