added BaseExpression::is_long_field_name()
added BaseExpression::need_to_add_field_prefix() now the fields() methods don't take add_column_prefix parameter but the field_name (wchar_t*) is tested whether is it a long (with a period) or short name added BaseExpression::save_foreign_key() (code moved from field()) removed some default method arguments from BaseExpression added neq() method for Finder added DbExpression::prepare_short_table_name(const PT::TextStream & table_name, PT::TextStream & short_table_name) git-svn-id: svn://ttmath.org/publicrep/morm/branches/join_models@1194 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -99,39 +99,6 @@ void Model::table_name(PT::TextStream & stream)
|
||||
}
|
||||
|
||||
|
||||
// the body can be moved to dbexpression
|
||||
// the algorithm can be different depending on the database used
|
||||
void Model::table_name_for_join_as(PT::TextStream & stream)
|
||||
{
|
||||
PT::TextStream str_temp;
|
||||
table_name(str_temp);
|
||||
|
||||
// temporarily
|
||||
std::string str;
|
||||
str_temp.to_string(str);
|
||||
|
||||
size_t i = str.size();
|
||||
|
||||
while( i-- > 0 )
|
||||
{
|
||||
if( str[i] == '.' )
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if( str[i] == '.' )
|
||||
{
|
||||
i += 1;
|
||||
}
|
||||
|
||||
for( ; i < str.size() ; ++i)
|
||||
{
|
||||
stream << str[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Model::set_connector(ModelConnector & connector)
|
||||
{
|
||||
@@ -175,9 +142,9 @@ void Model::to_text(PT::TextStream & stream, ModelData * model_data, bool clear_
|
||||
|
||||
if( flat_connector )
|
||||
{
|
||||
this->model_env->model_data = model_data;
|
||||
model_env->model_data = model_data;
|
||||
flat_connector->to_text(stream, *this);
|
||||
this->model_env->model_data = nullptr;
|
||||
model_env->model_data = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -554,11 +521,6 @@ void Model::clear()
|
||||
}
|
||||
|
||||
|
||||
void Model::prepare_to_select()
|
||||
{
|
||||
model_env->table_index = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user