in src/codecs/field_codecs.h [563:582]
inline void encode(PyObject *field_value, DxApi::DataWriter &writer) {
int32_t value;
bool type_mismatch;
bool exists = getInt32Value(field_value, value, type_mismatch);
if (type_mismatch)
THROW_EXCEPTION("Wrong type of field '%s'. Required: INTEGER.", field_name_.c_str());
if (exists) {
if (!is_nullable_ && value == DxApi::Constants::INTERVAL_NULL) {
THROW_EXCEPTION("Field '%s' is not nullable. Value '%d' is invalid.", field_name_.c_str(), value);
}
writer.writeInterval(value);
} else {
if (!is_nullable_) {
THROW_EXCEPTION("Field '%s' is not nullable.", field_name_.c_str());
}
writer.writeInterval(DxApi::Constants::INTERVAL_NULL);
}
}