Add optional database connection parameters to the DatabaseLink. This
replaces the old, automatic setting of LongReadLen and LongTruncOk in SQL.pm, and is much more flexible. Fix some documentation with allowMacroAccess in the DatabaseLink. Additional tests for DatabaseLink. Document the new parameter behavior in the changelog and gotchas file.
This commit is contained in:
parent
350d7f6e01
commit
a9f45865e6
8 changed files with 78 additions and 29 deletions
|
|
@ -147,6 +147,7 @@ cmp_deeply(
|
|||
title => undef,
|
||||
allowedKeywords => undef,
|
||||
allowMacroAccess => 0,
|
||||
additionalParameters => '',
|
||||
},
|
||||
'create: passing no params autovivifies the databaseLinkId, but that is all',
|
||||
);
|
||||
|
|
@ -156,13 +157,14 @@ $dbLink->delete();
|
|||
is(scalar keys %{WebGUI::DatabaseLink->getList($session)}, $startingDbLinks, 'new DatabaseLink deleted');
|
||||
|
||||
my $dbLinkParams = {
|
||||
DSN => 'DBI:mysql:myDb:myHost',
|
||||
username => 'dbUser',
|
||||
identifier => 'dbPass',
|
||||
title => 'Access to my Awesome DB',
|
||||
allowedKeywords => 'SELECT UPDATE',
|
||||
databaseLinkId => 'fooBarBaz',
|
||||
allowMacroAccess => 0,
|
||||
DSN => 'DBI:mysql:myDb:myHost',
|
||||
username => 'dbUser',
|
||||
identifier => 'dbPass',
|
||||
title => 'Access to my Awesome DB',
|
||||
allowedKeywords => 'SELECT UPDATE',
|
||||
databaseLinkId => 'fooBarBaz',
|
||||
allowMacroAccess => 0,
|
||||
additionalParameters => '',
|
||||
};
|
||||
|
||||
$dbLink = WebGUI::DatabaseLink->create($session, $dbLinkParams);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue