added support for PT::Space as a field in a Model
methods before_field_value_string() and after_field_value_string() moved from DbExpression and JsonExpression to BaseExpression and made virtual and now methods before_field_value(const std::wstring &) and after_field_value(const std::wstring &) (and the rest of them with string arguments) can be removed from DbExpression, PostgreSqlExpression and JsonExpression
This commit is contained in:
@@ -313,51 +313,70 @@ void BaseExpression::after_second_part_long_field_name()
|
||||
|
||||
void BaseExpression::before_field_value(const std::wstring &)
|
||||
{
|
||||
before_field_value_string();
|
||||
}
|
||||
|
||||
|
||||
void BaseExpression::before_field_value(const std::string &)
|
||||
{
|
||||
before_field_value_string();
|
||||
}
|
||||
|
||||
|
||||
void BaseExpression::after_field_value(const std::wstring &)
|
||||
{
|
||||
after_field_value_string();
|
||||
}
|
||||
|
||||
|
||||
void BaseExpression::after_field_value(const std::string &)
|
||||
{
|
||||
after_field_value_string();
|
||||
}
|
||||
|
||||
|
||||
void BaseExpression::before_field_value(const wchar_t *)
|
||||
{
|
||||
before_field_value_string();
|
||||
}
|
||||
|
||||
|
||||
void BaseExpression::after_field_value(const wchar_t *)
|
||||
{
|
||||
after_field_value_string();
|
||||
}
|
||||
|
||||
|
||||
void BaseExpression::before_field_value(const char *)
|
||||
{
|
||||
before_field_value_string();
|
||||
}
|
||||
|
||||
|
||||
void BaseExpression::after_field_value(const char *)
|
||||
{
|
||||
after_field_value_string();
|
||||
}
|
||||
|
||||
void BaseExpression::before_field_value(const PT::Date &)
|
||||
{
|
||||
before_field_value_string();
|
||||
}
|
||||
|
||||
void BaseExpression::after_field_value(const PT::Date &)
|
||||
{
|
||||
after_field_value_string();
|
||||
}
|
||||
|
||||
void BaseExpression::before_field_value(const PT::Space &)
|
||||
{
|
||||
before_field_value_string();
|
||||
}
|
||||
|
||||
void BaseExpression::after_field_value(const PT::Space &)
|
||||
{
|
||||
after_field_value_string();
|
||||
}
|
||||
|
||||
|
||||
void BaseExpression::put_name_value_separator()
|
||||
@@ -543,114 +562,138 @@ void BaseExpression::esc(const PT::WTextStream & val, PT::TextStream & stream)
|
||||
}
|
||||
}
|
||||
|
||||
void BaseExpression::put_type(char val, PT::TextStream & stream)
|
||||
void BaseExpression::esc(const PT::Space & space, PT::TextStream & stream)
|
||||
{
|
||||
stream << "char";
|
||||
}
|
||||
PT::WTextStream tmp_stream;
|
||||
|
||||
void BaseExpression::put_type(unsigned char val, PT::TextStream & stream)
|
||||
{
|
||||
stream << "unsigned char";
|
||||
if( space.table.size() > 0 )
|
||||
{
|
||||
tmp_stream.clear();
|
||||
}
|
||||
|
||||
space.Serialize(tmp_stream, true);
|
||||
esc(tmp_stream, stream);
|
||||
}
|
||||
|
||||
|
||||
void BaseExpression::put_type(const std::wstring & val, PT::TextStream & stream)
|
||||
{
|
||||
stream << "text";
|
||||
}
|
||||
|
||||
void BaseExpression::put_type(const wchar_t * val, PT::TextStream & stream)
|
||||
{
|
||||
stream << "text";
|
||||
}
|
||||
|
||||
|
||||
void BaseExpression::put_type(const std::string & val, PT::TextStream & stream)
|
||||
{
|
||||
stream << "text";
|
||||
}
|
||||
|
||||
void BaseExpression::put_type(const char * val, PT::TextStream & stream)
|
||||
{
|
||||
stream << "text";
|
||||
}
|
||||
|
||||
|
||||
void BaseExpression::put_type(bool val, PT::TextStream & stream)
|
||||
{
|
||||
stream << "boolean";
|
||||
}
|
||||
|
||||
void BaseExpression::put_type(short val, PT::TextStream & stream)
|
||||
{
|
||||
stream << "short integer";
|
||||
}
|
||||
|
||||
void BaseExpression::put_type(unsigned short val, PT::TextStream & stream)
|
||||
{
|
||||
stream << "unsigned short integer";
|
||||
}
|
||||
|
||||
void BaseExpression::put_type(int val, PT::TextStream & stream)
|
||||
{
|
||||
stream << "integer";
|
||||
}
|
||||
|
||||
void BaseExpression::put_type(unsigned int val, PT::TextStream & stream)
|
||||
{
|
||||
stream << "unsigned integer";
|
||||
}
|
||||
|
||||
void BaseExpression::put_type(long val, PT::TextStream & stream)
|
||||
{
|
||||
stream << "long integer";
|
||||
}
|
||||
|
||||
void BaseExpression::put_type(unsigned long val, PT::TextStream & stream)
|
||||
{
|
||||
stream << "unsigned long integer";
|
||||
}
|
||||
|
||||
void BaseExpression::put_type(long long val, PT::TextStream & stream)
|
||||
{
|
||||
stream << "very long integer";
|
||||
}
|
||||
|
||||
void BaseExpression::put_type(unsigned long long val, PT::TextStream & stream)
|
||||
{
|
||||
stream << "unsigned very long integer";
|
||||
}
|
||||
|
||||
void BaseExpression::put_type(float val, PT::TextStream & stream)
|
||||
{
|
||||
stream << "float";
|
||||
}
|
||||
|
||||
void BaseExpression::put_type(double val, PT::TextStream & stream)
|
||||
{
|
||||
stream << "double";
|
||||
}
|
||||
|
||||
void BaseExpression::put_type(long double val, PT::TextStream & stream)
|
||||
{
|
||||
stream << "long double";
|
||||
}
|
||||
|
||||
//void BaseExpression::put_type(void* val, PT::TextStream & stream)
|
||||
//void BaseExpression::put_type(char val, PT::TextStream & stream)
|
||||
//{
|
||||
// stream << "char";
|
||||
//}
|
||||
//
|
||||
//void BaseExpression::put_type(unsigned char val, PT::TextStream & stream)
|
||||
//{
|
||||
// stream << "unsigned char";
|
||||
//}
|
||||
//
|
||||
//
|
||||
//void BaseExpression::put_type(const std::wstring & val, PT::TextStream & stream)
|
||||
//{
|
||||
// stream << "text";
|
||||
//}
|
||||
//
|
||||
//void BaseExpression::put_type(const wchar_t * val, PT::TextStream & stream)
|
||||
//{
|
||||
// stream << "text";
|
||||
//}
|
||||
//
|
||||
//
|
||||
//void BaseExpression::put_type(const std::string & val, PT::TextStream & stream)
|
||||
//{
|
||||
// stream << "text";
|
||||
//}
|
||||
//
|
||||
//void BaseExpression::put_type(const char * val, PT::TextStream & stream)
|
||||
//{
|
||||
// stream << "text";
|
||||
//}
|
||||
//
|
||||
//
|
||||
//void BaseExpression::put_type(bool val, PT::TextStream & stream)
|
||||
//{
|
||||
// stream << "boolean";
|
||||
//}
|
||||
//
|
||||
//void BaseExpression::put_type(short val, PT::TextStream & stream)
|
||||
//{
|
||||
// stream << "short integer";
|
||||
//}
|
||||
//
|
||||
//void BaseExpression::put_type(unsigned short val, PT::TextStream & stream)
|
||||
//{
|
||||
// stream << "unsigned short integer";
|
||||
//}
|
||||
//
|
||||
//void BaseExpression::put_type(int val, PT::TextStream & stream)
|
||||
//{
|
||||
// stream << "integer";
|
||||
//}
|
||||
//
|
||||
//void BaseExpression::put_type(unsigned int val, PT::TextStream & stream)
|
||||
//{
|
||||
// stream << "unsigned integer";
|
||||
//}
|
||||
//
|
||||
//void BaseExpression::put_type(long val, PT::TextStream & stream)
|
||||
//{
|
||||
// stream << "long integer";
|
||||
//}
|
||||
//
|
||||
//void BaseExpression::put_type(unsigned long val, PT::TextStream & stream)
|
||||
//{
|
||||
// stream << "unsigned long integer";
|
||||
//}
|
||||
//
|
||||
//void BaseExpression::put_type(long long val, PT::TextStream & stream)
|
||||
//{
|
||||
// stream << "very long integer";
|
||||
//}
|
||||
//
|
||||
//void BaseExpression::put_type(unsigned long long val, PT::TextStream & stream)
|
||||
//{
|
||||
// stream << "unsigned very long integer";
|
||||
//}
|
||||
//
|
||||
//void BaseExpression::put_type(float val, PT::TextStream & stream)
|
||||
//{
|
||||
// stream << "float";
|
||||
//}
|
||||
//
|
||||
//void BaseExpression::put_type(double val, PT::TextStream & stream)
|
||||
//{
|
||||
// stream << "double";
|
||||
//}
|
||||
//
|
||||
//void BaseExpression::put_type(long double val, PT::TextStream & stream)
|
||||
//{
|
||||
// stream << "long double";
|
||||
//}
|
||||
//
|
||||
////void BaseExpression::put_type(void* val, PT::TextStream & stream)
|
||||
////{
|
||||
////}
|
||||
//
|
||||
//
|
||||
//void BaseExpression::put_type(const PT::Date & date, PT::TextStream & stream)
|
||||
//{
|
||||
// stream << "date";
|
||||
//}
|
||||
//
|
||||
//void BaseExpression::put_type(const Model & model, PT::TextStream & stream)
|
||||
//{
|
||||
// stream << "object";
|
||||
//}
|
||||
|
||||
|
||||
void BaseExpression::put_type(const PT::Date & date, PT::TextStream & stream)
|
||||
void BaseExpression::before_field_value_string()
|
||||
{
|
||||
stream << "date";
|
||||
}
|
||||
|
||||
void BaseExpression::put_type(const Model & model, PT::TextStream & stream)
|
||||
void BaseExpression::after_field_value_string()
|
||||
{
|
||||
stream << "object";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user