add Model::field(...) methods with a pt::Stream argument

This commit is contained in:
2024-06-04 10:24:05 +02:00
parent 90b4d9af0b
commit cd067ae5c3
9 changed files with 145 additions and 11 deletions

View File

@@ -736,10 +736,20 @@ void BaseExpression::esc(const pt::Stream & val, pt::Stream & stream, const FT &
{
if( val.is_char_stream() )
{
// from utf8 to utf8 or from utf8 to wide
pt::utf8_to_output_function_by_index(val, [&](int z) {
esc(static_cast<char32_t>(z), stream, field_type, model_env);
});
if( field_type.is_hexadecimal() || field_type.is_binary() )
{
for(size_t i=0 ; i<val.size() ; ++i )
{
esc(val.get_char(i), stream, field_type, model_env);
}
}
else
{
// from utf8 to utf8 or from utf8 to wide
pt::utf8_to_output_function_by_index(val, [&](int z) {
esc(static_cast<char32_t>(z), stream, field_type, model_env);
});
}
}
else
if( val.is_wchar_stream() )