changed the way how the table name is set in a Model - added prepare_table() method
removed from Model: virtual void table_name(PT::TextStream & stream); added to Model: virtual void prepare_table(); virtual void table(const wchar_t * table_name); virtual void table(const wchar_t * schema_name, const wchar_t * table_name);
This commit is contained in:
@@ -314,37 +314,4 @@ DbExpression & DbExpression::page(PT::TextStream & stream, size_t page_number, s
|
||||
|
||||
|
||||
|
||||
|
||||
void DbExpression::prepare_short_table_name(const PT::TextStream & table_name, PT::TextStream & short_table_name)
|
||||
{
|
||||
short_table_name.clear();
|
||||
|
||||
if( is_long_table_name(table_name) )
|
||||
{
|
||||
PT::TextStream::const_iterator i = table_name.begin();
|
||||
bool was_dot = false;
|
||||
|
||||
while( i != table_name.end() )
|
||||
{
|
||||
if( was_dot )
|
||||
{
|
||||
short_table_name << *i;
|
||||
}
|
||||
else
|
||||
if( *i == '.' )
|
||||
{
|
||||
was_dot = true;
|
||||
}
|
||||
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
if( short_table_name.empty() )
|
||||
{
|
||||
short_table_name = table_name;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user