Exemplo n.º 1
0
 static int ctime_bool(const ObObjCastParams &params, const ObExprObj &in, ObExprObj &out)
 {
     UNUSED(params);
     OB_ASSERT(in.get_type() == ObCreateTimeType);
     out.set_bool(static_cast<bool> (in.get_ctime()));
     return OB_SUCCESS;
 }
Exemplo n.º 2
0
 static int ctime_pdatetime(const ObObjCastParams &params, const ObExprObj &in, ObExprObj &out)
 {
     UNUSED(params);
     OB_ASSERT(in.get_type() == ObCreateTimeType);
     out.set_precise_datetime(static_cast<ObPreciseDateTime> (in.get_ctime()));
     return OB_SUCCESS;
 }
Exemplo n.º 3
0
 static int ctime_decimal(const ObObjCastParams &params, const ObExprObj &in, ObExprObj &out)
 {
     UNUSED(params);
     OB_ASSERT(in.get_type() == ObCreateTimeType);
     ObNumber num;
     num.from(static_cast<int64_t> (in.get_ctime()));
     out.set_decimal(num);
     return OB_SUCCESS;
 }
Exemplo n.º 4
0
 static int ctime_varchar(const ObObjCastParams &params, const ObExprObj &in, ObExprObj &out)
 {
     UNUSED(params);
     OB_ASSERT(in.get_type() == ObCreateTimeType);
     return timestamp_varchar(in.get_ctime(), out);
 }