some work in morm (select statement)

git-svn-id: svn://ttmath.org/publicrep/morm/trunk@1079 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2018-04-15 23:00:17 +00:00
parent b1af7b8d25
commit 09f31b2803
11 changed files with 405 additions and 195 deletions

View File

@@ -227,28 +227,34 @@ void DbExpression::prepare_to_where_clause()
}
DbExpression & DbExpression::group_or()
DbExpression & DbExpression::group_or(PT::TextStream & stream)
{
out_stream = &stream;
field_before();
(*out_stream) << "(";
is_first_field = true;
conjunctions.push_back(MORM_CONJUNCTION_OR);
out_stream = nullptr;
return *this;
}
DbExpression & DbExpression::group_and()
DbExpression & DbExpression::group_and(PT::TextStream & stream)
{
out_stream = &stream;
field_before();
(*out_stream) << "(";
is_first_field = true;
conjunctions.push_back(MORM_CONJUNCTION_AND);
out_stream = nullptr;
return *this;
}
DbExpression & DbExpression::group_end()
DbExpression & DbExpression::group_end(PT::TextStream & stream)
{
out_stream = &stream;
if( !conjunctions.empty() )
{
conjunctions.pop_back();
@@ -256,6 +262,7 @@ DbExpression & DbExpression::group_end()
field_after();
}
out_stream = nullptr;
return *this;
}