OmniSciDB  2e3a973ef4
anonymous_namespace{DdlCommandExecutor.cpp} Namespace Reference

Functions

void set_headers (TQueryResult &_return, const std::vector< std::string > &headers)
 
void add_row (TQueryResult &_return, const std::vector< std::string > &row)
 

Function Documentation

◆ add_row()

void anonymous_namespace{DdlCommandExecutor.cpp}::add_row ( TQueryResult &  _return,
const std::vector< std::string > &  row 
)

Definition at line 51 of file DdlCommandExecutor.cpp.

Referenced by ShowTablesCommand::execute(), and ShowDatabasesCommand::execute().

51  {
52  for (size_t i = 0; i < row.size(); i++) {
53  _return.row_set.columns[i].data.str_col.emplace_back(row[i]);
54  _return.row_set.columns[i].nulls.emplace_back(false);
55  }
56 }
+ Here is the caller graph for this function:

◆ set_headers()

void anonymous_namespace{DdlCommandExecutor.cpp}::set_headers ( TQueryResult &  _return,
const std::vector< std::string > &  headers 
)

Definition at line 37 of file DdlCommandExecutor.cpp.

Referenced by ShowForeignServersCommand::execute(), ShowTablesCommand::execute(), and ShowDatabasesCommand::execute().

37  {
38  TRowDescriptor row_descriptor;
39  for (const auto& header : headers) {
40  TColumnType column_type{};
41  column_type.col_name = header;
42  column_type.col_type.type = TDatumType::type::STR;
43  row_descriptor.push_back(column_type);
44 
45  _return.row_set.columns.emplace_back();
46  }
47  _return.row_set.row_desc = row_descriptor;
48  _return.row_set.is_columnar = true;
49 }
+ Here is the caller graph for this function: