Changeset 747 for trunk/docs


Ignore:
Timestamp:
Jan 15, 2016, 6:06:51 AM (4 years ago)
Author:
cito
Message:

Improve the get/set_parameter methods

In addition to a list, also allow a set as parameter.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/contents/pg/db_wrapper.rst

    r745 r747  
    168168that is the current setting of the run-time parameter with that name.
    169169
    170 You can get several parameters at once by passing a list or tuple of
    171 parameter names.  The return value will then be a corresponding list
    172 of parameter settings.  If you pass a dict as parameter instead, its
    173 values will be set to the parameter settings corresponding to its keys.
     170You can get several parameters at once by passing a list, set or dict.
     171When passing a list of parameter names, the return value will be a
     172corresponding list of parameter settings.  When passing a set of
     173parameter names, a new dict will be returned, mapping these parameter
     174names to their settings.  Finally, if you pass a dict as parameter,
     175its values will be set to the current parameter settings corresponding
     176to its keys.
    174177
    175178By passing the special name `'all'` as the parameter, you can get a dict
     
    194197then the run-time parameter will be restored to its default value.
    195198
    196 You can set several parameters at once by passing a list or tuple
    197 of parameter names, with a single value that all parameters should
    198 be set to or with a corresponding list or tuple of values.
    199 
    200 You can also pass a dict as parameters.  In this case, you should
    201 not pass a value, since the values will be taken from the dict.
     199You can set several parameters at once by passing a list of parameter
     200names, together with a single value that all parameters should be
     201set to or with a corresponding list of values.  You can also pass
     202the parameters as a set if you only provide a single value.
     203Finally, you can pass a dict with parameter names as keys.  In this
     204case, you should not pass a value, since the values for the parameters
     205will be taken from the dict.
    202206
    203207By passing the special name `'all'` as the parameter, you can reset
Note: See TracChangeset for help on using the changeset viewer.