Is there any way to determine if a value can be used for a Field / DataType?

e.g.:

Field f = <a non-nullable varchar(2)>;

assert f.accepts("");
assert f.accepts("a");
assert f.accepts("ab");

assert ! f.accepts("abc");
assert ! f.accepts(null);
assert ! f.accepts();

Field g = <a nullable unsigned byte>;

assert g.accepts(null);
assert g.accepts(0);
assert g.accepts(1);

assert ! g.accepts("");
assert ! g.accepts("a");
assert ! g.accepts(-1);
assert ! g.accepts(999999);

If something like this exists, is it strict, or converting?

e.g.:

if strict, a varchar(2) column would not accept an Integer 1, but would 
accept a String "1"

if converting, a varchar(2) column would accept an Integer 1

Also, is it possible for UpdateSetStep#set(Field field, T value) (and 
similar methods) to throw an exception if the field cannot accept the 
value?  (for any reason, like nullability, data type, length, precision, 
scale, etc.)

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to