Ejemplo n.º 1
0
 // Provide return type length/scale/precision information (given the input
 // type length/scale/precision), as well as column names
 virtual void getReturnType(ServerInterface &srvfloaterface, 
                            const SizedColumnTypes &inputTypes, 
                            SizedColumnTypes &outputTypes)
 {
     int int_part = inputTypes.getColumnType(0).getNumericPrecision();
     int frac_part = inputTypes.getColumnType(0).getNumericScale();
     outputTypes.addNumeric(int_part+frac_part, frac_part);
 }
Ejemplo n.º 2
0
 virtual void getIntermediateTypes(ServerInterface &srvInterface,
                                   const SizedColumnTypes &inputTypes, 
                                   SizedColumnTypes 
                                   &intermediateTypeMetaData)
 {
     int int_part = inputTypes.getColumnType(0).getNumericIntegral();
     int frac_part = inputTypes.getColumnType(0).getNumericFractional();
     intermediateTypeMetaData.addNumeric(int_part+frac_part, frac_part); // intermediate sum
     intermediateTypeMetaData.addInt(); // count of items
 }