[AGENT++] value_ok() implemention about special columnar object.

Jochen Katz katz at agentpp.com
Wed Jan 17 23:11:00 CET 2007


Hi again ;-)

> i assume that there are two columnar objects in a table, colType
> INTEGER{ absolute(0), percent(1) } and colValue Integer32,  when
> colType take the value absolute(0), i have to check the value of
> colValue for range [0,2147483647],  when colType take the value
> percent(1), i have to check the value of colValue for range [0,100],
> so how can i implement the value_ok for colValue? just simply check
> the value of colValue for range [0,2147483647], i think it's not
> enough. appreciate your help in advance!

in value_ok() of colValue you can get a pointer to the colType object
and check its value. But you also have to check if the request sets both
(colType and colValue) at the same time, and you have to check/change
the colValue if colType is set to percent,...

Regards,
  Jochen



More information about the AGENTPP mailing list