easy_sql.sql_processor.step
Module Contents
Classes
- class easy_sql.sql_processor.step.ExecutedSqlTransformer
- abstract transform_create_view_sql(self, view_name, select_sql)
- class easy_sql.sql_processor.step.ReportCollector
- class easy_sql.sql_processor.step.SqlCleaner
- class easy_sql.sql_processor.step.Step(id, reporter_collector, func_runner, target_config=None, select_sql=None, debug_var_tmpl_replace=False, *, executed_sql_transformer=None)
- Parameters
id (str) –
reporter_collector (ReportCollector) –
func_runner (easy_sql.sql_processor.funcs.FuncRunner) –
target_config (Optional[StepConfig]) –
select_sql (Optional[str]) –
debug_var_tmpl_replace (bool) –
executed_sql_transformer (Optional[ExecutedSqlTransformer]) –
- collect_report(self, status=None, message=None)
- is_template_statement(self)
- preprocess_select_sql(self, context)
- Parameters
context (easy_sql.sql_processor.context.ProcessorContext) –
- read(self, backend, context)
- Parameters
backend (easy_sql.sql_processor.backend.Backend) –
context (easy_sql.sql_processor.context.ProcessorContext) –
- Return type
Optional[easy_sql.sql_processor.backend.Table]
- should_run(self, context)
- Parameters
context (easy_sql.sql_processor.context.ProcessorContext) –
- write(self, backend, table, context, dry_run=False)
- Parameters
backend (easy_sql.sql_processor.backend.Backend) –
table (Optional[easy_sql.sql_processor.backend.Table]) –
context (easy_sql.sql_processor.context.ProcessorContext) –
dry_run (bool) –
- class easy_sql.sql_processor.step.StepConfig(step_type, step_name, condition, line_no, step_config_str='')
- Parameters
- STEP_CONFIG_PATTERN = ^-- target\s*=\s*(\w+)(.*)$
- static from_config_line(config_line, line_no)
- Parameters
- Return type
- has_condition(self)
- is_target_name_a_func(self)
- class easy_sql.sql_processor.step.StepFactory(reporter, func_runner, executed_sql_transformer=None)
- Parameters
reporter (ReportCollector) –
func_runner (easy_sql.sql_processor.funcs.FuncRunner) –
executed_sql_transformer (Optional[ExecutedSqlTransformer]) –