some work: we need a different way of naming tables for joins

git-svn-id: svn://ttmath.org/publicrep/morm/branches/join_models@1187 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2019-03-26 20:35:05 +00:00
parent 9c7a0f3d7e
commit ab54a3fc3e
8 changed files with 181 additions and 22 deletions

View File

@@ -81,11 +81,16 @@ PT::TextStream * BaseExpression::get_current_stream()
}
void BaseExpression::set_column_prefix(const std::wstring & prefix)
void BaseExpression::set_column_prefix(const std::string & prefix)
{
column_prefix = prefix;
}
std::string BaseExpression::get_column_prefix()
{
return column_prefix;
}
void BaseExpression::generate_from_model(PT::TextStream & stream, Model & model)
{
this->out_stream = &stream;
@@ -155,10 +160,16 @@ void BaseExpression::put_field_name(int table_index, const wchar_t * field_name,
{
before_field_name();
if( table_index >= 0 )
{
(*out_stream) << 't' << table_index << '.';
}
// if( !add_column_prefix )
// {
//
//
// }
//
// if( table_index >= 0 )
// {
// (*out_stream) << 't' << table_index << '.';
// }
if( add_column_prefix && !column_prefix.empty() )
{