add a CSVConnector/CSVExpression classes to serialize to csv format
Current limitation: list/vectors are not serialized. while here: - move the output_type flag from the DbExpression to BaseExpression class - add Model::to_text(...) methods with an Export parameter
This commit is contained in:
@@ -51,6 +51,7 @@ BaseExpression::BaseExpression()
|
||||
clear();
|
||||
}
|
||||
|
||||
|
||||
BaseExpression::~BaseExpression()
|
||||
{
|
||||
}
|
||||
@@ -61,6 +62,7 @@ void BaseExpression::clear()
|
||||
out_stream = nullptr;
|
||||
is_first_field = false;
|
||||
work_mode = 0;
|
||||
output_type = 0;
|
||||
use_prefix = false;
|
||||
}
|
||||
|
||||
@@ -77,6 +79,18 @@ int BaseExpression::get_work_mode()
|
||||
}
|
||||
|
||||
|
||||
void BaseExpression::set_output_type(int output_type)
|
||||
{
|
||||
this->output_type = output_type;
|
||||
}
|
||||
|
||||
|
||||
int BaseExpression::get_output_type()
|
||||
{
|
||||
return output_type;
|
||||
}
|
||||
|
||||
|
||||
|
||||
pt::TextStream * BaseExpression::get_text_stream()
|
||||
{
|
||||
@@ -184,6 +198,13 @@ bool BaseExpression::can_field_model_be_generated(bool has_model_primary_key, co
|
||||
}
|
||||
|
||||
|
||||
bool BaseExpression::can_field_list_be_generated(const FT &)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool BaseExpression::should_field_model_be_generated_as_null(bool has_model_primary_key, const FT & field_type)
|
||||
{
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user