changed: esc() function for bool uses now 'true' and 'false' strings

added:  esc() for PT::Date




git-svn-id: svn://ttmath.org/publicrep/morm/trunk@1078 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
Tomasz Sowa 2018-04-12 16:05:14 +00:00
parent fceec43d07
commit b1af7b8d25
2 changed files with 11 additions and 1 deletions

View File

@ -231,7 +231,10 @@ void BaseExpression::esc(const char * val, PT::TextStream & stream)
void BaseExpression::esc(bool val, PT::TextStream & stream)
{
stream << val;
if( val )
stream << "true";
else
stream << "false";
}
@ -308,6 +311,11 @@ void BaseExpression::esc(void* val, PT::TextStream & stream)
}
void BaseExpression::esc(const PT::Date & date, PT::TextStream & stream)
{
stream << "'" << date << "'";
}
}

View File

@ -38,6 +38,7 @@
#include "textstream/textstream.h"
#include "morm_types.h"
#include "date/date.h"
namespace morm
@ -248,6 +249,7 @@ protected:
virtual void esc(long double val, PT::TextStream & stream);
virtual void esc(void* val, PT::TextStream & stream);
virtual void esc(const PT::Date & date, PT::TextStream & stream);
};