Difference: DBIQueryPlugin (8 vs. 9)

Revision 903 Jun 2006 - Main.VadimBelman

Line: 1 to 1
 

DBI Query Plugin

This plugin is intendent to provide TWiki with ability to make complex database requests using DBI Perl module.

Line: 147 to 147
 would provide us with variables %name%, %personalid%, %someotherinfo%.
Added:
>
>
There are some special cases like SHOW CREATE PROCEDURE query where column names may contain spaces within them. These spaces are changed with undersocre sign making it possible to refer to them as to database columns. I.e. 'Create Procedure' may be referred as %create_procedure%.
 The second step is subquery processing. %DBI_SUBQUERY{"subqueryname"}% statements are replaced with output from corresponding subqueries. All currently defined variables are passed to the subquery making it possible to use them for SQL statement, header and footer expansion.

Line: 311 to 313
 
  1. If none of the above is fulfilled then user and password keys of plugin configuration are used. If there is no user key then plugin refuses connection.
  2. Plugin attempts to connect.
Changed:
<
<
Additional control implemented for %DBI_DO%. Another configuration key named allow_do introduced which maps individual topic into list of users or groups with permission to use the feature. Special subkey default of this key defines default mapping. The implicit default is TWikiAdminGroup.
>
>
Additional control implemented for %DBI_DO%. Another configuration key named allow_do introduced which maps individual topic into list of users or groups with permission to use the feature. Special subkey default of this key defines default mapping. There is no default value for this subkey.

TIP WARNING! Using subkey default of allow_do key must be considered as a serious security whole and better be avoided.

 In the following example:
Line: 387 to 391
 
password Default database account password. none optional
database Database name on the server. none required
driver DBI driver used to access the server. none required
Added:
>
>
dsn Complete dsn string to be used when creating connection. See your DBD driver documentation.

TIP Note: With this key defined both database and driver keys are ignored.
none optional
init Initialization command to be sent to the database server just after the connection initiated. none optional
 
host DB server hostname. localhost optional
codepage Client-side codepage of this connection.* none optional
usermap Maps particular TWiki users or groups into database accounts. See Access Control section. none optional
Line: 429 to 435
 The last issue was the cause to implement classic plugin handling when it is requested during the inclusion procedure. Possible side effects of this hack are not studied yet and may create some headache.
Added:
>
>

Changelog

  • 1.2
    • Added 'dsn' and 'init' parameters of configuration file.
    • Character set support for PostgreSQL? .
    • No default value for 'allow_do' parameter of configuration file.
    • Support for column names with spaces.
 

Plugin Settings

Plugin settings are stored as preferences variables. To reference

Line: 458 to 472
 
Plugin Author: TWiki:Main.VadimBelman
Plugin Version: 13 Oct 2005
Change History:
<-- versions below in reverse order -->
 
Added:
>
>
3 Jun 2006 1.2
 
17 Oct 2005: 1.1
13 Oct 2005: Initial version
CPAN Dependencies: DBI, Error
 
Pixeon Medical Systems - Todos os direitos reservados. 2020
http://www.pixeon.com.br/