add Finder::is_null() and is_not_null() methods

This commit is contained in:
2023-07-08 23:26:54 +02:00
parent 25a91168ac
commit e7c62e35dc
4 changed files with 102 additions and 4 deletions

View File

@@ -787,13 +787,17 @@ protected:
template<typename FieldValue>
void put_field_name_and_value(const wchar_t * field_name, const FieldValue & field_value, void (Model::*getter_method)(pt::Stream &), const FT & field_type, ModelEnv * model_env)
{
bool allow_to_put_value = (get_output_type() != MORM_OUTPUT_TYPE_WHERE_IS_NULL && get_output_type() != MORM_OUTPUT_TYPE_WHERE_IS_NOT_NULL);
if( model_env && model_env->set_field_name_helper )
{
if( (size_t)model_env->field_index < model_env->set_field_name_helper->size() )
{
put_field_name_and_table_if_needed((*model_env->set_field_name_helper)[model_env->field_index], field_type, model_env);
put_name_value_separator();
put_field_value_or_null(field_value, getter_method, field_type, model_env);
if( allow_to_put_value )
put_field_value_or_null(field_value, getter_method, field_type, model_env);
}
model_env->field_index += 1;
@@ -802,7 +806,9 @@ protected:
{
put_field_name_and_table_if_needed(field_name, field_type, model_env);
put_name_value_separator();
put_field_value_or_null(field_value, getter_method, field_type, model_env);
if( allow_to_put_value )
put_field_value_or_null(field_value, getter_method, field_type, model_env);
}
}