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:
@@ -194,18 +194,6 @@ bool BaseExpression::is_long_field_name(const PT::TextStream & field_name)
|
||||
}
|
||||
|
||||
|
||||
bool BaseExpression::is_long_table_name(const wchar_t * table_name)
|
||||
{
|
||||
return is_long_field_name(table_name);
|
||||
}
|
||||
|
||||
bool BaseExpression::is_long_table_name(const PT::TextStream & table_name)
|
||||
{
|
||||
return is_long_field_name(table_name);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void BaseExpression::put_field_name(const wchar_t * field_name, ModelEnv * model_env)
|
||||
{
|
||||
if( is_long_field_name(field_name) )
|
||||
@@ -250,7 +238,7 @@ void BaseExpression::put_short_field_name(const wchar_t * field_name, ModelEnv *
|
||||
if( use_prefix && model_env )
|
||||
{
|
||||
before_first_part_long_field_name();
|
||||
esc(model_env->table_name_short, *out_stream);
|
||||
esc(model_env->table_name, *out_stream);
|
||||
|
||||
if( model_env->table_index > 1 )
|
||||
{
|
||||
@@ -545,6 +533,15 @@ void BaseExpression::esc(const PT::TextStream & val, PT::TextStream & stream)
|
||||
}
|
||||
}
|
||||
|
||||
void BaseExpression::esc(const PT::WTextStream & val, PT::TextStream & stream)
|
||||
{
|
||||
PT::WTextStream::const_iterator i = val.begin();
|
||||
|
||||
for(; i != val.end() ; ++i)
|
||||
{
|
||||
esc(*i, stream);
|
||||
}
|
||||
}
|
||||
|
||||
void BaseExpression::put_type(char val, PT::TextStream & stream)
|
||||
{
|
||||
|
Reference in New Issue
Block a user