added: Finder::prefix() method

code not thoroughly tested



git-svn-id: svn://ttmath.org/publicrep/morm/trunk@1106 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2018-05-01 23:22:32 +00:00
parent 98206fdb7a
commit e25b6d9a29
7 changed files with 92 additions and 29 deletions

View File

@@ -60,6 +60,19 @@ void BaseExpression::set_work_mode(int work_mode)
}
void BaseExpression::prepare_to_new_expression()
{
column_prefix.clear();
out_stream = nullptr;
is_first_field = false;
work_mode = 0;
}
void BaseExpression::set_column_prefix(const std::wstring & prefix)
{
column_prefix = prefix;
}
void BaseExpression::generate_from_model(PT::TextStream & stream, Model & model)
{
this->out_stream = &stream;
@@ -113,6 +126,13 @@ void BaseExpression::field_after()
void BaseExpression::put_field_name(const wchar_t * field_name)
{
before_field_name();
if( !column_prefix.empty() )
{
esc(column_prefix, *out_stream);
(*out_stream) << '.';
}
esc(field_name, *out_stream);
after_field_name();
}