Commit 25f131ae authored by Murray Cumming's avatar Murray Cumming
Browse files

db_utils_export: Put These in their own namespace.

parent 8f94beb0
......@@ -2050,7 +2050,7 @@ void AppWindow::on_menu_file_save_as_example()
FoundSet found_set;
found_set.m_table_name = table_name;
auto const_sequence = Utils::const_list(sequence);
DbUtils::export_data_to_vector(document, example_rows, found_set, const_sequence);
DbUtilsExport::export_data_to_vector(document, example_rows, found_set, const_sequence);
//std::cout << " debug after row_text=" << row_text << std::endl;
document->set_table_example_data(table_name, example_rows);
......
......@@ -587,7 +587,7 @@ void Frame_Glom::on_menu_file_export()
return;
}
DbUtils::export_data_to_stream(document, the_stream, found_set, const_sequence);
DbUtilsExport::export_data_to_stream(document, the_stream, found_set, const_sequence);
}
void Frame_Glom::on_menu_file_import()
......
......@@ -29,10 +29,9 @@
namespace Glom
{
namespace DbUtils
namespace DbUtilsExport
{
//TODO: Reduce copy/pasting in these export_data_to_*() methods:
void export_data_to_vector(const std::shared_ptr<Document>& document, Document::type_example_rows& the_vector, const FoundSet& found_set, const Document::type_list_const_layout_groups& sequence)
{
......@@ -183,6 +182,6 @@ void export_data_to_stream(const std::shared_ptr<Document>& document, std::ostre
}
}
} //namespace DbUtils
} //namespace DbUtilsExport
} //namespace Glom
......@@ -28,14 +28,14 @@
namespace Glom
{
namespace DbUtils
namespace DbUtilsExport
{
void export_data_to_vector(const std::shared_ptr<Document>& document, Document::type_example_rows& the_vector, const FoundSet& found_set, const Document::type_list_const_layout_groups& sequence);
void export_data_to_stream(const std::shared_ptr<Document>& document, std::ostream& the_stream, const FoundSet& found_set, const Document::type_list_const_layout_groups& sequence);
} //namespace DbUtils
} //namespace DbUtilsExport
} //namespace Glom
......
......@@ -50,7 +50,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
group->add_item(field_year);
std::stringstream the_stream;
Glom::DbUtils::export_data_to_stream(document, the_stream, found_set, layout_groups);
Glom::DbUtilsExport::export_data_to_stream(document, the_stream, found_set, layout_groups);
const auto text = the_stream.str();
std::cout << "debug: " << text << std::endl;
......
......@@ -47,7 +47,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
group->add_item(field);
std::stringstream the_stream;
Glom::DbUtils::export_data_to_stream(document, the_stream, found_set, layout_groups);
Glom::DbUtilsExport::export_data_to_stream(document, the_stream, found_set, layout_groups);
const auto text = the_stream.str();
if(text.empty())
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment