add Finder::raw(pt::Date&,...) and esc(pt::Date &,...) methods
This commit is contained in:
parent
21f12a8a98
commit
8200092524
|
@ -231,6 +231,15 @@ public:
|
|||
}
|
||||
|
||||
|
||||
template<typename FieldValue>
|
||||
void value_to_stream(pt::TextStream & stream, const FieldValue & field_value, const FT & field_type, ModelEnv * model_env = nullptr)
|
||||
{
|
||||
this->out_stream = &stream;
|
||||
put_field_value(field_value, field_type, model_env);
|
||||
this->out_stream = nullptr;
|
||||
}
|
||||
|
||||
|
||||
virtual void put_schema_table(const wchar_t * schema_name, const wchar_t * table_name);
|
||||
virtual void put_schema_table(const pt::WTextStream & schema_name, const pt::WTextStream & table_name);
|
||||
virtual void put_table(const wchar_t * table_name);
|
||||
|
|
28
src/finder.h
28
src/finder.h
|
@ -752,6 +752,17 @@ public:
|
|||
}
|
||||
|
||||
|
||||
Finder<ModelClass> & raw(const pt::Date & date, bool add_spaces = true, const FT & field_type = morm::FT::default_type)
|
||||
{
|
||||
if( out_stream && db_expression )
|
||||
{
|
||||
db_expression->esc(date, *out_stream, field_type);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
Finder<ModelClass> & esc(const char * str, bool add_quotes = true, const FT & field_type = morm::FT::default_type)
|
||||
{
|
||||
if( out_stream && db_expression )
|
||||
|
@ -818,6 +829,23 @@ public:
|
|||
}
|
||||
|
||||
|
||||
Finder<ModelClass> & esc(const pt::Date & date, bool add_spaces = true, const FT & field_type = morm::FT::default_type)
|
||||
{
|
||||
if( out_stream && db_expression )
|
||||
{
|
||||
if( add_spaces )
|
||||
(*out_stream) << ' ';
|
||||
|
||||
db_expression->value_to_stream(*out_stream, date, field_type);
|
||||
|
||||
if( add_spaces )
|
||||
(*out_stream) << ' ';
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* like
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue