csvzall 0.4.0
CSV command-line tool and emerging C++ library
Loading...
Searching...
No Matches
csvzall::pipeline Namespace Reference

Namespaces

namespace  commands
 
namespace  common
 

Classes

struct  LoggerCallbacks
 
struct  RunOptions
 
struct  RunStats
 

Enumerations

enum class  ViewModeSelection { Auto , Paged }
 
enum class  SqlQueryInputKind { kCsv , kSqlite , kUnknown }
 

Functions

int RunDerive (const std::string &assignment, std::istream &input, std::ostream &output, const RunOptions &options, const LoggerCallbacks &logger, RunStats &stats)
 
int RunFilter (const std::string &expression, std::istream &input, std::ostream &output, const RunOptions &options, const LoggerCallbacks &logger, RunStats &stats)
 
int RunSummarize (const std::string &group_by_column, const std::string &max_column, const std::vector< std::string > &show_columns, std::istream &input, std::ostream &output, const RunOptions &options, const LoggerCallbacks &logger, RunStats &stats)
 
int RunTimeseries (const std::string &x_column, const std::string &y_column, const std::string &series_column, const std::string &reduce, const std::string &format, std::istream &input, std::ostream &output, const RunOptions &options, const LoggerCallbacks &logger, RunStats &stats)
 
int RunJsonExtract (const std::string &input_path, const std::string &mapping_path, std::ostream &output, const LoggerCallbacks &logger, RunStats &stats)
 
int RunMax (const std::string &column, std::istream &input, std::ostream &output, const RunOptions &options, const LoggerCallbacks &logger, RunStats &stats)
 
int RunMin (const std::string &column, std::istream &input, std::ostream &output, const RunOptions &options, const LoggerCallbacks &logger, RunStats &stats)
 
int RunAppend (const std::string &existing_path, const std::string &incoming_path, bool in_place, std::ostream &output, const LoggerCallbacks &logger, RunStats &stats)
 
int RunMerge (const std::string &existing_path, const std::string &incoming_path, const std::string &key_column, bool in_place, std::ostream &output, const LoggerCallbacks &logger, RunStats &stats)
 
int RunView (const std::string &input_path, std::ostream &output, const RunOptions &options, const LoggerCallbacks &logger, RunStats &stats, int requested_port, bool open_browser, bool serve_once, bool startup_json)
 
int RunHeatmap (const std::string &date_column, const std::string &value_column, const std::string &label_column, const std::string &start_date, const std::string &end_date, const std::string &title, std::istream &input, std::ostream &output, const RunOptions &options, const LoggerCallbacks &logger, RunStats &stats)
 
int RunHeatmap (const common::HeatmapSpec &spec, std::istream &input, std::ostream &output, const RunOptions &options, const LoggerCallbacks &logger, RunStats &stats)
 
int RunCharts (const std::string &config_path, const std::string &chart_id, bool validate_only, const RunOptions &options, const LoggerCallbacks &logger, RunStats &stats)
 
int RunSqlExport (const std::string &input_path, const std::string &dest_path, const std::string &table_name, std::istream &input, const RunOptions &options, const LoggerCallbacks &logger, RunStats &stats)
 
int RunSqlQueryCsv (const std::string &sql_query, const std::string &table_name, const std::string &format, std::istream &input, std::ostream &output, const RunOptions &options, const LoggerCallbacks &logger, RunStats &stats)
 
SqlQueryInputKind DetectSqlQueryInputKind (const std::string &path)
 
int RunSqlQueryDb (const std::string &sql_query, const std::string &db_path, const std::string &format, std::ostream &output, const LoggerCallbacks &logger, RunStats &stats)
 
bool ShouldWarnIntegerDivision (const std::string &sql_query)
 
int RunPostgresExport (std::istream &input, const RunOptions &options, const LoggerCallbacks &logger, RunStats &stats, const ::csvzall::postgres::ConnectionConfig &pg_config, const std::string &table_name, const std::string &if_exists_mode)
 
int RunPostgresInfer (std::istream &input, const RunOptions &options, const LoggerCallbacks &logger, RunStats &stats, const std::string &table_name)
 

Enumeration Type Documentation

◆ SqlQueryInputKind

Enumerator
kCsv 
kSqlite 
kUnknown 

◆ ViewModeSelection

Enumerator
Auto 
Paged 

Function Documentation

◆ DetectSqlQueryInputKind()

SqlQueryInputKind csvzall::pipeline::DetectSqlQueryInputKind ( const std::string &  path)

◆ RunAppend()

int csvzall::pipeline::RunAppend ( const std::string &  existing_path,
const std::string &  incoming_path,
bool  in_place,
std::ostream &  output,
const LoggerCallbacks &  logger,
RunStats &  stats 
)

◆ RunCharts()

int csvzall::pipeline::RunCharts ( const std::string &  config_path,
const std::string &  chart_id,
bool  validate_only,
const RunOptions &  options,
const LoggerCallbacks &  logger,
RunStats &  stats 
)

◆ RunDerive()

int csvzall::pipeline::RunDerive ( const std::string &  assignment,
std::istream &  input,
std::ostream &  output,
const RunOptions &  options,
const LoggerCallbacks &  logger,
RunStats &  stats 
)

◆ RunFilter()

int csvzall::pipeline::RunFilter ( const std::string &  expression,
std::istream &  input,
std::ostream &  output,
const RunOptions &  options,
const LoggerCallbacks &  logger,
RunStats &  stats 
)

◆ RunHeatmap() [1/2]

int csvzall::pipeline::RunHeatmap ( const common::HeatmapSpec &  spec,
std::istream &  input,
std::ostream &  output,
const RunOptions &  options,
const LoggerCallbacks &  logger,
RunStats &  stats 
)

◆ RunHeatmap() [2/2]

int csvzall::pipeline::RunHeatmap ( const std::string &  date_column,
const std::string &  value_column,
const std::string &  label_column,
const std::string &  start_date,
const std::string &  end_date,
const std::string &  title,
std::istream &  input,
std::ostream &  output,
const RunOptions &  options,
const LoggerCallbacks &  logger,
RunStats &  stats 
)

◆ RunJsonExtract()

int csvzall::pipeline::RunJsonExtract ( const std::string &  input_path,
const std::string &  mapping_path,
std::ostream &  output,
const LoggerCallbacks &  logger,
RunStats &  stats 
)

◆ RunMax()

int csvzall::pipeline::RunMax ( const std::string &  column,
std::istream &  input,
std::ostream &  output,
const RunOptions &  options,
const LoggerCallbacks &  logger,
RunStats &  stats 
)

◆ RunMerge()

int csvzall::pipeline::RunMerge ( const std::string &  existing_path,
const std::string &  incoming_path,
const std::string &  key_column,
bool  in_place,
std::ostream &  output,
const LoggerCallbacks &  logger,
RunStats &  stats 
)

◆ RunMin()

int csvzall::pipeline::RunMin ( const std::string &  column,
std::istream &  input,
std::ostream &  output,
const RunOptions &  options,
const LoggerCallbacks &  logger,
RunStats &  stats 
)

◆ RunPostgresExport()

int csvzall::pipeline::RunPostgresExport ( std::istream &  input,
const RunOptions &  options,
const LoggerCallbacks &  logger,
RunStats &  stats,
const ::csvzall::postgres::ConnectionConfig &  pg_config,
const std::string &  table_name,
const std::string &  if_exists_mode 
)

◆ RunPostgresInfer()

int csvzall::pipeline::RunPostgresInfer ( std::istream &  input,
const RunOptions &  options,
const LoggerCallbacks &  logger,
RunStats &  stats,
const std::string &  table_name 
)

◆ RunSqlExport()

int csvzall::pipeline::RunSqlExport ( const std::string &  input_path,
const std::string &  dest_path,
const std::string &  table_name,
std::istream &  input,
const RunOptions &  options,
const LoggerCallbacks &  logger,
RunStats &  stats 
)

◆ RunSqlQueryCsv()

int csvzall::pipeline::RunSqlQueryCsv ( const std::string &  sql_query,
const std::string &  table_name,
const std::string &  format,
std::istream &  input,
std::ostream &  output,
const RunOptions &  options,
const LoggerCallbacks &  logger,
RunStats &  stats 
)

◆ RunSqlQueryDb()

int csvzall::pipeline::RunSqlQueryDb ( const std::string &  sql_query,
const std::string &  db_path,
const std::string &  format,
std::ostream &  output,
const LoggerCallbacks &  logger,
RunStats &  stats 
)

◆ RunSummarize()

int csvzall::pipeline::RunSummarize ( const std::string &  group_by_column,
const std::string &  max_column,
const std::vector< std::string > &  show_columns,
std::istream &  input,
std::ostream &  output,
const RunOptions &  options,
const LoggerCallbacks &  logger,
RunStats &  stats 
)

◆ RunTimeseries()

int csvzall::pipeline::RunTimeseries ( const std::string &  x_column,
const std::string &  y_column,
const std::string &  series_column,
const std::string &  reduce,
const std::string &  format,
std::istream &  input,
std::ostream &  output,
const RunOptions &  options,
const LoggerCallbacks &  logger,
RunStats &  stats 
)

◆ RunView()

int csvzall::pipeline::RunView ( const std::string &  input_path,
std::ostream &  output,
const RunOptions &  options,
const LoggerCallbacks &  logger,
RunStats &  stats,
int  requested_port,
bool  open_browser,
bool  serve_once,
bool  startup_json 
)

◆ ShouldWarnIntegerDivision()

bool csvzall::pipeline::ShouldWarnIntegerDivision ( const std::string &  sql_query)