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

Namespaces

namespace  view_internal
 

Classes

class  BarCommand
 
class  CsvIndexedFile
 
class  CsvInputCommand
 
class  CsvTransformCommand
 
class  CsvViewData
 
class  DeriveCommand
 
class  FilterCommand
 
class  HeatmapCommand
 
class  LineCommand
 
class  PostgresExportCommand
 
class  PostgresInferCommand
 
class  SqlExportCommand
 
class  SqlQueryCsvCommand
 
class  SummarizeCommand
 
class  TimeseriesCommand
 
class  ViewServer
 
struct  ViewServerOptions
 

Typedefs

using CsvRowIndexEntry = ::csvzall::viewer::CsvRowIndexEntry
 
using CsvColumnDescriptor = ::csvzall::viewer::CsvColumnDescriptor
 
using CsvLogicalRow = ::csvzall::viewer::CsvLogicalRow
 
using CsvViewDataMode = ::csvzall::viewer::CsvViewDataMode
 

Enumerations

enum class  SqlQueryInputKind { kCsv , kSqlite , kUnknown }
 

Functions

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 RunBar (const charts::BarSpec &spec, std::istream &input, std::ostream &output, const RunOptions &options, const LoggerCallbacks &logger, RunStats &stats)
 
int RunChart (const charts::ChartSpec &spec, const RunOptions &options, const LoggerCallbacks &logger, RunStats &stats)
 
int ValidateChart (const charts::ChartSpec &spec, 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 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 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 RunBar (const ::csvzall::charts::BarSpec &spec, std::istream &input, std::ostream &output, const RunOptions &options, const LoggerCallbacks &logger, RunStats &stats)
 
int RunLine (const ::csvzall::charts::LineSpec &spec, std::istream &input, std::ostream &output, const RunOptions &options, const LoggerCallbacks &logger, RunStats &stats)
 
int RunChart (const common::ChartSpec &spec, const RunOptions &options, const LoggerCallbacks &logger, RunStats &stats)
 
int ValidateChart (const common::ChartSpec &spec, 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)
 
int RunHeatmap (const charts::HeatmapSpec &spec, std::istream &input, std::ostream &output, const RunOptions &options, const LoggerCallbacks &logger, RunStats &stats)
 
int RunLine (const charts::LineSpec &spec, std::istream &input, std::ostream &output, const RunOptions &options, const LoggerCallbacks &logger, RunStats &stats)
 
int RunPostgresExport (std::istream &input, const RunOptions &options, const LoggerCallbacks &logger, RunStats &stats, const postgres::ConnectionConfig &pg_config, const std::string &table_name, const std::string &if_exists_mode)
 
inline ::csvzall::sqlite::SqliteDbOpenOptions MakeSqliteDbOpenOptions (const RunOptions &options)
 
inline ::csvzall::sqlite::CsvLoadOptions MakeCsvLoadOptions (const RunOptions &options)
 
inline ::csvzall::sqlite::SqliteLogCallbacks MakeSqliteLogCallbacks (const LoggerCallbacks &logger)
 
std::string FormatViewStartupOutput (const std::string &url, const bool startup_json)
 

Typedef Documentation

◆ CsvColumnDescriptor

◆ CsvLogicalRow

◆ CsvRowIndexEntry

◆ CsvViewDataMode

Enumeration Type Documentation

◆ SqlQueryInputKind

Enumerator
kCsv 
kSqlite 
kUnknown 

Function Documentation

◆ DetectSqlQueryInputKind()

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

◆ FormatViewStartupOutput()

std::string csvzall::pipeline::commands::FormatViewStartupOutput ( const std::string &  url,
const bool  startup_json 
)

◆ MakeCsvLoadOptions()

inline ::csvzall::sqlite::CsvLoadOptions csvzall::pipeline::commands::MakeCsvLoadOptions ( const RunOptions &  options)

◆ MakeSqliteDbOpenOptions()

inline ::csvzall::sqlite::SqliteDbOpenOptions csvzall::pipeline::commands::MakeSqliteDbOpenOptions ( const RunOptions &  options)

◆ MakeSqliteLogCallbacks()

inline ::csvzall::sqlite::SqliteLogCallbacks csvzall::pipeline::commands::MakeSqliteLogCallbacks ( const LoggerCallbacks &  logger)

◆ RunAppend()

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

◆ RunBar() [1/2]

int csvzall::pipeline::commands::RunBar ( const ::csvzall::charts::BarSpec &  spec,
std::istream &  input,
std::ostream &  output,
const RunOptions &  options,
const LoggerCallbacks &  logger,
RunStats &  stats 
)

◆ RunBar() [2/2]

int csvzall::pipeline::commands::RunBar ( const charts::BarSpec &  spec,
std::istream &  input,
std::ostream &  output,
const RunOptions &  options,
const LoggerCallbacks &  logger,
RunStats &  stats 
)

◆ RunChart() [1/2]

int csvzall::pipeline::commands::RunChart ( const charts::ChartSpec &  spec,
const RunOptions &  options,
const LoggerCallbacks &  logger,
RunStats &  stats 
)

◆ RunChart() [2/2]

int csvzall::pipeline::commands::RunChart ( const common::ChartSpec &  spec,
const RunOptions &  options,
const LoggerCallbacks &  logger,
RunStats &  stats 
)

◆ RunCharts()

int csvzall::pipeline::commands::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::commands::RunDerive ( const std::string &  assignment,
std::istream &  input,
std::ostream &  output,
const RunOptions &  options,
const LoggerCallbacks &  logger,
RunStats &  stats 
)

◆ RunFilter()

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

◆ RunHeatmap() [1/3]

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

◆ RunHeatmap() [2/3]

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

◆ RunHeatmap() [3/3]

int csvzall::pipeline::commands::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::commands::RunJsonExtract ( const std::string &  input_path,
const std::string &  mapping_path,
std::ostream &  output,
const LoggerCallbacks &  logger,
RunStats &  stats 
)

◆ RunLine() [1/2]

int csvzall::pipeline::commands::RunLine ( const ::csvzall::charts::LineSpec &  spec,
std::istream &  input,
std::ostream &  output,
const RunOptions &  options,
const LoggerCallbacks &  logger,
RunStats &  stats 
)

◆ RunLine() [2/2]

int csvzall::pipeline::commands::RunLine ( const charts::LineSpec &  spec,
std::istream &  input,
std::ostream &  output,
const RunOptions &  options,
const LoggerCallbacks &  logger,
RunStats &  stats 
)

◆ RunMax()

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

◆ RunMerge()

int csvzall::pipeline::commands::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::commands::RunMin ( const std::string &  column,
std::istream &  input,
std::ostream &  output,
const RunOptions &  options,
const LoggerCallbacks &  logger,
RunStats &  stats 
)

◆ RunPostgresExport() [1/2]

int csvzall::pipeline::commands::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 
)

◆ RunPostgresExport() [2/2]

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

◆ RunPostgresInfer()

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

◆ RunSqlExport()

int csvzall::pipeline::commands::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::commands::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::commands::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::commands::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::commands::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::commands::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::commands::ShouldWarnIntegerDivision ( const std::string &  sql_query)

◆ ValidateChart() [1/2]

int csvzall::pipeline::commands::ValidateChart ( const charts::ChartSpec &  spec,
const RunOptions &  options,
const LoggerCallbacks &  logger,
RunStats &  stats 
)

◆ ValidateChart() [2/2]

int csvzall::pipeline::commands::ValidateChart ( const common::ChartSpec &  spec,
const RunOptions &  options,
const LoggerCallbacks &  logger,
RunStats &  stats 
)