plasoscaffolder.frontend.controller package

Submodules

plasoscaffolder.frontend.controller.sqlite_controller module

File representing the Controller for SQLite plugin.

class plasoscaffolder.frontend.controller.sqlite_controller.SQLiteController(output_handler: <plasoscaffolder.common.base_output_handler.BaseOutputHandler object at 0x7fccff591278>, plugin_helper: <plasoscaffolder.bll.services.base_sqlite_plugin_helper.BaseSQLitePluginHelper object at 0x7fccfe965d68>)[source]

Bases: object

Class representing the SQLite Controller.

Generate(template_path: str, yapf_path: str)[source]

Generating the files.

Parameters:
  • template_path (str) – the path to the template directory
  • yapf_path (str) – the path to the yapf style file
GetCustomizable(columns: [<class 'plasoscaffolder.model.sql_query_column_model_data.SQLColumnModelData'>]) → [<class 'plasoscaffolder.model.sql_query_column_model_data.SQLColumnModelData'>][source]

Gets the customizable columns from the user

Parameters:columns ([sql_query_column_model_data.SQLColumnModelData]) – the columns from the SQL query.
Returns:
the columns
from the SQL query an set if the column is customizable
Return type:[sql_query_column_model_data.SQLColumnModelData]
GetTimestamps(columns: [<class 'plasoscaffolder.model.sql_query_column_model.SQLColumnModel'>], data: [<class 'str'>]) -> ([<class 'plasoscaffolder.model.sql_query_column_model_data.SQLColumnModelData'>], [<class 'plasoscaffolder.model.sql_query_column_model_timestamp.SQLColumnModelTimestamp'>])[source]

Gets the timestamp from the user and the columns.

Parameters:
Returns:

[sql_query_column_model_data.SQLColumnModelData],

[sql_query_column_model_timestamp.SQLColumnModelTimestamp]: A tuple of columns. The first column represents the normal column for the query. The second column represents the timestamp events.

PluginName(unused_ctx: click.core.Context, unused_param: click.core.Option, value: str) → str[source]

Saving the plugin name.

Parameters:
  • unused_ctx (click.core.Context) – the click context (automatically given via callback)
  • unused_param (click.core.Option) – the click command (automatically given via callback)
  • value (str) – the source path (automatically given via callback)
Returns:

the plugin name representing the same as value

Return type:

str

SQLQuery(unused_ctx: click.core.Context, unused_param: click.core.Option, value: str) → [<class 'plasoscaffolder.model.sql_query_model.SQLQueryModel'>][source]

The SQL Query of the plugin.

Parameters:
  • unused_ctx (click.core.Context) – the click context (automatically given via callback)
  • unused_param (click.core.Option) – the click command (automatically given via callback)
  • value (str) – the SQL Query (automatically given via callback)
Returns:

a list of SQL Query models

Return type:

[sql_query_model.SQLQueryModel]

SourcePath(unused_ctx: click.core.Context, unused_param: click.core.Option, value: str) → str[source]

Saving the source path.

Parameters:
  • unused_ctx (click.core.Context) – the click context (automatically given via callback)
  • unused_param (click.core.Option) – the click command (automatically given via callback)
  • value (str) – the source path (automatically given via callback)
Returns:

the source path representing the same as value

Return type:

str

TestPath(unused_ctx: click.core.Context, unused_param: click.core.Option, value: str) → str[source]

Saving the path to the test file.

Parameters:
  • unused_ctx (click.core.Context) – the click context (automatically given via callback)
  • unused_param (click.core.Option) – the click command (automatically given via callback)
  • value (str) – the source path (automatically given via callback)
Returns:

the test file path representing the same as the value

Return type:

str

Module contents