当前位置: 首页>>代码示例>>C++>>正文


C++ OB_ASSERT函数代码示例

本文整理汇总了C++中OB_ASSERT函数的典型用法代码示例。如果您正苦于以下问题:C++ OB_ASSERT函数的具体用法?C++ OB_ASSERT怎么用?C++ OB_ASSERT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了OB_ASSERT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ob_dec_phy_operator_stat

 void ob_dec_phy_operator_stat(ObPhyOperatorType type)
 {
   OB_ASSERT(type >= PHY_INVALID && type < PHY_END);
   TBSYS_LOG(DEBUG, "ob_dec_phy_operator_stat %s num=%lu",
       ob_phy_operator_type_str(type), PHY_OP_STAT[type]);
   atomic_dec(&PHY_OP_STAT[type]);
 }
开发者ID:Alibaba-boonya,项目名称:oceanbase,代码行数:7,代码来源:ob_phy_operator_type.cpp

示例2: OB_ASSERT

 int ObStatManager::set_value(const uint64_t mod_id, const uint64_t table_id, const int32_t index, const int64_t value)
 {
   int ret = OB_ERROR;
   bool need_add_new = true;
   OB_ASSERT(mod_id < OB_MAX_MOD_NUMBER);
   for (int32_t i = 0; table_id != OB_INVALID_ID && mod_id != OB_INVALID_ID && i < table_stats_[mod_id].get_array_index(); i++)
   {
     if (data_holder_[mod_id][i].get_table_id() == table_id)
     {
       need_add_new = false;
       ret = data_holder_[mod_id][i].set_value(index, value);
     }
   }
   if (need_add_new && table_id != OB_INVALID_ID && mod_id != OB_INVALID_ID)
   {
     ObStat stat;
     stat.set_mod_id(mod_id);
     stat.set_table_id(table_id);
     ret = stat.set_value(index, value);
     if (OB_SUCCESS == ret)
     {
       if ((ret = add_new_stat(stat)) == OB_ENTRY_EXIST)
       {
         ret = set_value(mod_id, table_id, index, value);
       }
     }
   }
   return ret;
 }
开发者ID:Alibaba-boonya,项目名称:oceanbase,代码行数:29,代码来源:ob_statistics.cpp

示例3: OB_ASSERT

        /**************************************************
        Funtion     :   make_exec_plan_unit_string
        Author      :   qinbo
        Date        :   2013.12.9
        Description :   make select sql
        Input       :   ResultPlan& result_plan, 
                        string &where_conditions, 
                        vector<schema_shard*> shard_info,
                        string &assembled_sql
                        
        Output      :   
         **************************************************/
        int64_t ObDeleteStmt::make_exec_plan_unit_string(ResultPlan& result_plan, string where_conditions, vector<schema_shard*> &shard_info,string &assembled_sql)
        {
            int& ret = result_plan.err_stat_.err_code_ = OB_SUCCESS;
            ObLogicalPlan* logical_plan = static_cast<ObLogicalPlan*> (result_plan.plan_tree_);
            OB_ASSERT(NULL != logical_plan);

            assembled_sql.append("DELETE FROM ");
            string table_name = ObStmt::get_table_item_by_id(table_id_)->table_name_ ;
            if (table_name != shard_info.at(0)->get_table_name())
            {
                assembled_sql.append(shard_info.at(0)->get_shard_name());
            }
            else
            {
                assembled_sql.append(table_name);
            }

            if (where_conditions.empty())
            {
                make_delete_where_string(result_plan, assembled_sql);
            }
            else
            {
                assembled_sql.append(where_conditions);
                assembled_sql.append(" ");
            }
            return ret;
        }
开发者ID:taotaochanghe,项目名称:sql_parser,代码行数:40,代码来源:sql_delete_stmt.cpp

示例4: mtime_bool

 static int mtime_bool(const ObObjCastParams &params, const ObExprObj &in, ObExprObj &out)
 {
     UNUSED(params);
     OB_ASSERT(in.get_type() == ObModifyTimeType);
     out.set_bool(static_cast<bool> (in.get_mtime()));
     return OB_SUCCESS;
 }
开发者ID:b-xiang,项目名称:sql_parser-1,代码行数:7,代码来源:ob_obj_cast.cpp

示例5: ctime_float

 static int ctime_float(const ObObjCastParams &params, const ObExprObj &in, ObExprObj &out)
 {
     UNUSED(params);
     OB_ASSERT(in.get_type() == ObCreateTimeType);
     out.set_float(static_cast<float> (in.get_ctime()));
     return OB_SUCCESS;
 }
开发者ID:b-xiang,项目名称:sql_parser-1,代码行数:7,代码来源:ob_obj_cast.cpp

示例6: bool_ctime

 static int bool_ctime(const ObObjCastParams &params, const ObExprObj &in, ObExprObj &out)
 {
     UNUSED(params);
     OB_ASSERT(in.get_type() == ObBoolType);
     out.set_ctime(static_cast<ObCreateTime> (in.get_bool()));
     return OB_SUCCESS;
 }
开发者ID:b-xiang,项目名称:sql_parser-1,代码行数:7,代码来源:ob_obj_cast.cpp

示例7: mtime_pdatetime

 static int mtime_pdatetime(const ObObjCastParams &params, const ObExprObj &in, ObExprObj &out)
 {
     UNUSED(params);
     OB_ASSERT(in.get_type() == ObModifyTimeType);
     out.set_precise_datetime(static_cast<ObPreciseDateTime> (in.get_mtime()));
     return OB_SUCCESS;
 }
开发者ID:b-xiang,项目名称:sql_parser-1,代码行数:7,代码来源:ob_obj_cast.cpp

示例8: ctime_datetime

 static int ctime_datetime(const ObObjCastParams &params, const ObExprObj &in, ObExprObj &out)
 {
     UNUSED(params);
     OB_ASSERT(in.get_type() == ObCreateTimeType);
     out.set_datetime(static_cast<ObDateTime> (in.get_ctime() / 1000000L));
     return OB_SUCCESS;
 }
开发者ID:b-xiang,项目名称:sql_parser-1,代码行数:7,代码来源:ob_obj_cast.cpp

示例9: double_int

 static int double_int(const ObObjCastParams &params, const ObExprObj &in, ObExprObj &out)
 {
     UNUSED(params);
     OB_ASSERT(in.get_type() == ObDoubleType);
     out.set_int(static_cast<int64_t> (in.get_double()));
     return OB_SUCCESS;
 }
开发者ID:b-xiang,项目名称:sql_parser-1,代码行数:7,代码来源:ob_obj_cast.cpp

示例10: double_mtime

 static int double_mtime(const ObObjCastParams &params, const ObExprObj &in, ObExprObj &out)
 {
     UNUSED(params);
     OB_ASSERT(in.get_type() == ObDoubleType);
     out.set_mtime(static_cast<ObModifyTime> (in.get_double()));
     return OB_SUCCESS;
 }
开发者ID:b-xiang,项目名称:sql_parser-1,代码行数:7,代码来源:ob_obj_cast.cpp

示例11: decimal_bool

 static int decimal_bool(const ObObjCastParams &params, const ObExprObj &in, ObExprObj &out)
 {
     UNUSED(params);
     OB_ASSERT(in.get_type() == ObDecimalType);
     out.set_bool(!in.get_decimal().is_zero());
     return OB_SUCCESS;
 }
开发者ID:b-xiang,项目名称:sql_parser-1,代码行数:7,代码来源:ob_obj_cast.cpp

示例12: float_double

 static int float_double(const ObObjCastParams &params, const ObExprObj &in, ObExprObj &out)
 {
     UNUSED(params);
     OB_ASSERT(in.get_type() == ObFloatType);
     out.set_double(static_cast<double> (in.get_float()));
     return OB_SUCCESS;
 }
开发者ID:b-xiang,项目名称:sql_parser-1,代码行数:7,代码来源:ob_obj_cast.cpp

示例13: int_datetime

 static int int_datetime(const ObObjCastParams &params, const ObExprObj &in, ObExprObj &out)
 {
     UNUSED(params);
     OB_ASSERT(in.get_type() == ObIntType);
     out.set_datetime(static_cast<ObDateTime> (in.get_int()));
     return OB_SUCCESS;
 }
开发者ID:b-xiang,项目名称:sql_parser-1,代码行数:7,代码来源:ob_obj_cast.cpp

示例14: bool_float

 static int bool_float(const ObObjCastParams &params, const ObExprObj &in, ObExprObj &out)
 {
     UNUSED(params);
     OB_ASSERT(in.get_type() == ObBoolType);
     out.set_float(static_cast<float> (in.get_bool()));
     return OB_SUCCESS;
 }
开发者ID:b-xiang,项目名称:sql_parser-1,代码行数:7,代码来源:ob_obj_cast.cpp

示例15: int_varchar

 static int int_varchar(const ObObjCastParams &params, const ObExprObj &in, ObExprObj &out)
 {
     int ret = OB_SUCCESS;
     UNUSED(params);
     OB_ASSERT(in.get_type() == ObIntType);
     ret = varchar_printf(out, "%ld", in.get_int());
     return ret;
 }
开发者ID:b-xiang,项目名称:sql_parser-1,代码行数:8,代码来源:ob_obj_cast.cpp


注:本文中的OB_ASSERT函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。