1.1.7.2.2. gnr.web.batch.btcbase - base batches

1.1.7.2.2.2. BaseResourceBatch - webpage variables

With the term webpages variables we mean that there are some defined variables that you can use to customize the class to which they belong (in this case, the BaseResourceBatch class). They are:

1.1.7.2.2.2.1. batch_cancellable

If True, allow to stop the batch during its execution

1.1.7.2.2.2.2. batch_delay

A string with the time milliseconds start delay

1.1.7.2.2.2.3. batch_note

Allow to add a note to the batch.

In the prints the “batch_title” adds a default note to the notes region of the print setting dialog

1.1.7.2.2.2.4. batch_prefix

A string with a prefix for the batch name.

Example:

batch_prefix = 'st_prest'

1.1.7.2.2.2.5. batch_steps

TODO

1.1.7.2.2.2.6. batch_thermo_lines

TODO

1.1.7.2.2.2.7. batch_title

A string with the batch title.

In the prints the “batch_title” is the title of the print setting dialog

1.1.7.2.2.2.8. dialog_height

Define the height of the batch dialog

1.1.7.2.2.2.9. dialog_width

Define the width of the batch dialog

1.1.7.2.2.2.10. virtual_columns

TODO

1.1.7.2.2.3. gnr.web.batch.btcbase - The complete reference list

class gnr.web.batch.btcbase.BaseResourceBatch(page=None, resource_table=None, sourcepage_id=None)

Base resource class to create a batch

batchUpdate(updater=None, table=None, where=None, line_code=None, message=None, **kwargs)

Redefine the batchUpdate() of the gnrsqltable module. Allow to make an update of the database. For more information, check the batchUpdate section

Parameters:
  • updater – MANDATORY. It can be a dict() (if the batch is a simple substitution) or a method
  • table – the database table name on which the query will be executed, in the form packageName.tableName (packageName is the name of the package to which the table belongs to)
  • where – the where parameter
  • line_code – TODO
  • message – TODO
defineSelection(selectionName=None, selectedRowidx=None, selectionFilterCb=None, sortBy=None)

TODO

Parameters:
  • selectionName – TODO
  • selectedRowidx – TODO
  • selectionFilterCb – TODO
  • sortBy – TODO
do(**kwargs)

Hook method. It starts during the run() method execution if you have defined the batch_steps webpage variable

get_record(pkey, virtual_columns=None)

TODO

Parameters:
get_record_caption(item, progress, maximum, tblobj=None, **kwargs)

TODO

Parameters:
  • item – TODO
  • progress – TODO
  • maximum – TODO
  • tblobj – TODO
get_records()

TODO

get_selection(columns=None)

TODO

Parameters:columns – it represents the columns to be returned by the “SELECT” clause in the traditional sql query. For more information, check the columns section
get_selection_pkeys()

TODO

get_step_caption(item, progress, maximum, **kwargs)

TODO

Parameters:
  • item – TODO
  • progress – TODO
  • maximum – TODO
parameters_pane(pane, **kwargs)

Hook method. This method receives a ContentPane through which you can build a form to get parameters from client

Parameters:pane – the contentPane
pre_process()

Hook method on initing of the batch execution

result_handler()

TODO

run()

Run the batch

storeResult(key, result, record=None, **info)

TODO

Parameters:
  • key – TODO
  • result – TODO
  • record – TODO
  • info (**) – TODO