| 
    MiniOB 1
    
   MiniOB is one mini database, helping developers to learn how database works. 
   | 
 
整型类型 更多...
#include <integer_type.h>
  
Public 成员函数 | |
| int | compare (const Value &left, const Value &right) const override | 
| RC | add (const Value &left, const Value &right, Value &result) const override | 
| 计算 left + right,并将结果保存到 result 中  更多... | |
| RC | subtract (const Value &left, const Value &right, Value &result) const override | 
| 计算 left - right,并将结果保存到 result 中  更多... | |
| RC | multiply (const Value &left, const Value &right, Value &result) const override | 
| 计算 left * right,并将结果保存到 result 中  更多... | |
| RC | negative (const Value &val, Value &result) const override | 
| 计算 -val,并将结果保存到 result 中  更多... | |
| RC | cast_to (const Value &val, AttrType type, Value &result) const override | 
| 将 val 转换为 type 类型,并将结果保存到 result 中  更多... | |
| RC | set_value_from_str (Value &val, const string &data) const override | 
| RC | to_string (const Value &val, string &result) const override | 
| 将 val 转换为 string,并将结果保存到 result 中  更多... | |
  Public 成员函数 继承自 DataType | |
| DataType (AttrType attr_type) | |
| AttrType | get_attr_type () const | 
| virtual int | compare (const Value &left, const Value &right) const | 
| virtual RC | add (const Value &left, const Value &right, Value &result) const | 
| 计算 left + right,并将结果保存到 result 中  更多... | |
| virtual RC | subtract (const Value &left, const Value &right, Value &result) const | 
| 计算 left - right,并将结果保存到 result 中  更多... | |
| virtual RC | multiply (const Value &left, const Value &right, Value &result) const | 
| 计算 left * right,并将结果保存到 result 中  更多... | |
| virtual RC | divide (const Value &left, const Value &right, Value &result) const | 
| 计算 left / right,并将结果保存到 result 中  更多... | |
| virtual RC | negative (const Value &val, Value &result) const | 
| 计算 -val,并将结果保存到 result 中  更多... | |
| virtual RC | cast_to (const Value &val, AttrType type, Value &result) const | 
| 将 val 转换为 type 类型,并将结果保存到 result 中  更多... | |
| virtual RC | to_string (const Value &val, string &result) const | 
| 将 val 转换为 string,并将结果保存到 result 中  更多... | |
| virtual int | cast_cost (AttrType type) | 
| 计算从 type 到 attr_type 的隐式转换的 cost,如果无法转换,返回 INT32_MAX  更多... | |
| virtual RC | set_value_from_str (Value &val, const string &data) const | 
额外继承的成员函数 | |
  静态 Public 成员函数 继承自 DataType | |
| static DataType * | type_instance (AttrType attr_type) | 
  Protected 属性 继承自 DataType | |
| AttrType | attr_type_ | 
  静态 Protected 属性 继承自 DataType | |
| static array< unique_ptr< DataType >, static_cast< int >(AttrType::MAXTYPE)> | type_instances_ | 
整型类型
      
  | 
  overridevirtual | 
计算 left + right,并将结果保存到 result 中
重载 DataType .
将 val 转换为 type 类型,并将结果保存到 result 中
重载 DataType .
重载 DataType .
      
  | 
  overridevirtual | 
计算 left * right,并将结果保存到 result 中
重载 DataType .
计算 -val,并将结果保存到 result 中
重载 DataType .
      
  | 
  overridevirtual | 
重载 DataType .
      
  | 
  overridevirtual | 
计算 left - right,并将结果保存到 result 中
重载 DataType .
      
  | 
  overridevirtual | 
将 val 转换为 string,并将结果保存到 result 中
重载 DataType .